apache/seatunnel · error · ConnectException
Publication autocreation is disabled, please create one and
Error message
Publication autocreation is disabled, please create one and restart the connector.
What it means
initPublication checks whether the configured publication exists; when it does not and publication_autocreate_mode is DISABLED, it throws this ConnectException telling the user to create the publication manually and restart. pgoutput requires a publication, so without autocreation and without an existing publication the connector cannot proceed.
Source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-opengauss/src/main/java/io/debezium/connector/postgresql/connection/PostgresReplicationConnection.java:205
String selectPublication =
String.format(
"SELECT COUNT(1) FROM pg_publication WHERE pubname = '%s'",
publicationName);
conn.query(
selectPublication,
rs -> {
if (rs.next()) {
Long count = rs.getLong(1);
// Close eagerly as the transaction might stay running
if (count == 0L) {
LOGGER.info(
"Creating new publication '{}' for plugin '{}'",
publicationName,
plugin);
switch (publicationAutocreateMode) {
case DISABLED:
throw new ConnectException(
"Publication autocreation is disabled, please create one and restart the connector.");
case ALL_TABLES:
String createPublicationStmt =
String.format(
"CREATE PUBLICATION %s FOR ALL TABLES;",
publicationName);
LOGGER.info(
"Creating Publication with statement '{}'",
createPublicationStmt);
// Publication doesn't exist, create it.
conn.executeWithoutCommitting(createPublicationStmt);
break;
case FILTERED:
createOrUpdatePublicationModeFilterted(
tableFilterString, conn, false);
break;
}
} else {View on GitHub (pinned to cf67b549a7)
Solutions
- Create the publication manually on the server: CREATE PUBLICATION <name> FOR ALL TABLES; (or FOR TABLE ...).
- Or set publication.autocreate.mode=filtered (or all_tables) so the connector creates it.
- Verify publication.name in the connector config exactly matches an existing publication: SELECT pubname FROM pg_publications;
- Recreate the publication if it was dropped: it must include all tables the connector captures.
Example fix
-- before "publication.autocreate.mode" = "disabled" -- after (option A: config) "publication.autocreate.mode" = "filtered" -- after (option B: SQL) CREATE PUBLICATION seatunnel_publication FOR ALL TABLES;
Defensive patterns
Strategy: validation
Validate before calling
SELECT pubname FROM pg_publications; -- must contain the configured publication.name, or set publication.autocreate.mode != disabled
Try / catch
try {
connection.initPublication();
} catch (ConnectException e) {
// create the publication via SQL and restart the connector
} Prevention
- Pre-create the publication (CREATE PUBLICATION ... FOR ALL TABLES) before first start.
- Keep publication.name consistent between config and database.
- If autocreation is disabled, treat the publication as part of infrastructure provisioning.
When it happens
Trigger: Using plugin pgoutput, the SELECT from pg_publications finds no publication matching publication.name, and PublicationAutocreateMode.DISABLED is configured, so instead of CREATE PUBLICATION the connector fails fast.
Common situations: Config copied from a decoderbufs setup where no publication is needed; publication dropped by cleanup tooling; publication name typo between connector config and the database.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- No table filters found for filtered publication %s
- Invalid table name: ${tableStr} ,Postgres identifier is of t
- Table ${tableId} does not have a full replica identity, plea
- PostgreSQL-CDC startup.mode 'COMMITTED_OFFSET' requires an e
- Incremental snapshot for tables requires primary key, but ta
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/c0fb0ae28e528b5e.
Report an issue: GitHub.