Skip to main content

PostgreSQL Source Connector

Source connector

PostgreSQL Source Connector

PostgreSQL replication uses the Debezium PostgreSQL connector and PostgreSQL logical decoding. Use the common source workflow for Basic, Database Connection, Snapshot, Signal, Events, Transforms, and Error Handling.

Connector Class

io.debezium.connector.postgresql.PostgresConnector

Parameters

CategoryParameterRequiredRecommended / DefaultDescription
BasicnameYesUser-definedUnique Kafka Connect connector name. GIFROST derives topic.prefix as <name>-server.
Basictopic.prefixGenerated<name>-serverPrefix for topics in the form <topic.prefix>.<schema>.<table>.
Basictasks.maxYes1Keep one task for ordered WAL reading.
Database Connectiondatabase.hostnameYesFrom Database StorePostgreSQL host.
Database Connectiondatabase.portYes5432PostgreSQL port.
Database Connectiondatabase.userYesFrom Database StoreReplication user.
Database Connectiondatabase.passwordYesHiddenPassword or secret reference.
Database Connectiondatabase.dbnameYesFrom Database StoreDatabase name.
Database Settingsplugin.nameYespgoutputLogical decoding plugin.
Database Settingsslot.nameYesdebezium_<connector-name>Replication slot used to track WAL position.
Database Settingspublication.nameYesdbz_publicationPostgreSQL publication used by pgoutput.
Database Settingspublication.autocreate.modeNoall_tablesAllows Debezium to create the publication automatically.
Database Settingsslot.drop.on.stopNoEnabledDrops slot on graceful stop to avoid WAL retention by abandoned slots.
Database Wizardschema.include.list / schema.exclude.listNoGeneratedSchema filters generated by the wizard.
Database Wizardtable.include.list / table.exclude.listNoGeneratedTable filters generated by the wizard.
Database Wizardcolumn.include.list / column.exclude.listNoGeneratedColumn filters generated by the wizard.
Database Wizardmessage.key.columnsConditionalGeneratedCustom message keys for tables without primary keys.
Snapshotsnapshot.modeNoinitialInitial snapshot and streaming mode.
Signalsignal.data.collectionConditional<schemaName>.<tableName>Table used for Debezium signals.
Notificationnotification.sink.topic.nameNo<connector-name>-notificationsTopic for Debezium operation notifications.

PostgreSQL Notes

The database user must have privileges for logical replication and access to selected schemas and tables. If slot.drop.on.stop is enabled, stopping the connector intentionally removes the replication slot; use this only when the operational process can tolerate recreating the slot on the next start.

Reference

Debezium PostgreSQL connector