pgsql error in the callback [DBZ-8552]
- Dominant language
- HTML
- Stars
- 6
- Forks
- 8
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 1
Description
Migrated from [DBZ-8552](https://issues.redhat.com/browse/DBZ-8552)
In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.
h1. Bug report
pgsql error in the callback,
2024-12-31 16:46:01,299 INFO || [task-thread-relation_cdc_server_1874013356035538945_1871754362766819329-0hread] Stopping down connector [io.debezium.connector.common.BaseSourceTask]
... 9 more
at io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.execute(PostgresStreamingChangeEventSource.java:179)
at io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.processMessages(PostgresStreamingChangeEventSource.java:217)
at io.debezium.connector.postgresql.connection.PostgresReplicationConnection$1.readPending(PostgresReplicationConnection.java:703)
at org.postgresql.core.v3.replication.V3PGReplicationStream.readPending(V3PGReplicationStream.java:82)
at org.postgresql.core.v3.replication.V3PGReplicationStream.readInternal(V3PGReplicationStream.java:125)
at org.postgresql.core.v3.replication.V3PGReplicationStream.receiveNextData(V3PGReplicationStream.java:160)
at org.postgresql.core.v3.CopyDualImpl.readFromCopy(CopyDualImpl.java:44)
at org.postgresql.core.v3.QueryExecutorImpl.readFromCopy(QueryExecutorImpl.java:1198)
at org.postgresql.core.v3.QueryExecutorImpl.processCopyResults(QueryExecutorImpl.java:1299)
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2713)
Where: slot "relation_cdc_server_1874013356035538945_1871754362766819329", output plugin "pgoutput", in the change callback, associated LSN 0/178B9108
Caused by: org.postgresql.util.PSQLException: ERROR: publication "relation_cdc_server_1871754362766819329" does not exist
at java.base/java.lang.Thread.run(Thread.java:1583)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:143)
at io.debezium.pipeline.ChangeEventSourceCoordinator.executeChangeEventSources(ChangeEventSourceCoordinator.java:203)
at io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(ChangeEventSourceCoordinator.java:324)
at io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.execute(PostgresStreamingChangeEventSource.java:42)
at io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.execute(PostgresStreamingChangeEventSource.java:182)
at io.debezium.pipeline.ErrorHandler.setProducerThrowable(ErrorHandler.java:67)
org.apache.kafka.connect.errors.ConnectException: An exception occurred in the change event producer. This connector will be stopped.
h2. What Debezium connector do you use and what version?
3.0.6.Final
h2. What is the connector configuration?
{
"name": "relation_cdc_server_1874013356035538945_1871754362766819329",
"config": {
"connector.class": "io.debezium.connector.postgresql.PostgresConnector",
"slot.name": "relation_cdc_server_1874013356035538945_1871754362766819329",
"tasks.max": "1",
"database.history.kafka.topic": "relation_cdc_server_1874013356035538945_history.public",
"publication.name": "relation_cdc_server_1871754362766819329",
"transforms": "Reroute",
"schema.include.list": "public",
"schema.history.internal.store.only.captured.databases.ddl": "true",
"transforms.Reroute.topic.replacement": "relation_cdc_server_1874013356035538945_1871754362766819329_all",
"topic.prefix": "relation_cdc_server_1874013356035538945",
"decimal.handling.mode": "string",
"schema.history.internal.kafka.topic": "relation_cdc_server_1874013356035538945_history.public",
"replica.identity.autoset.values": "public.*:FULL",
"publication.autocreate.mode": "filtered",
"snapshot.include.collection.list": "81e52105005643fca2a11d29d9b4b9cc",
"transforms.Reroute.type": "io.debezium.transforms.ByLogicalTableRouter",
"database.user": "dacoo",
"database.dbname": "postgres",
"slot.drop.on.stop": "false",
"database.history.kafka.bootstrap.servers": "10.106.253.1:9092",
"database.server.name": "relation_cdc_server_1874013356035538945",
"schema.history.internal.kafka.bootstrap.servers": "10.106.253.1:9092",
"transforms.Reroute.topic.regex": "(.*)",
"database.port": "5432",
"plugin.name": "pgoutput",
"column.exclude.list": "",
"errors.max.retries": "5",
"database.connectionTimeZone": "Asia/Shanghai",
"database.hostname": "10.106.251.194",
"database.password": "test",
"name": "relation_cdc_server_1874013356035538945_1871754362766819329",
"skipped.operations": "none",
"table.include.list": "public.xqm_1225_1102",
"snapshot.mode": "initial",
"snowflakeId": "1874013356035538945"
},
"tasks": [
{
"connector": "relation_cdc_server_1874013356035538945_1871754362766819329",
"task": 0
}
],
"type": "source"
}
h2. What is the captured database version and mode of deployment?
pgsql 14
h2. What behavior do you expect?
Collect database data normally
h2. What behavior do you see?
After creating the task and writing database data, the connector encountered an exception
h2. Do you see the same behaviour using the latest released Debezium version?
3.0.6.Final
h2. Do you have the connector logs, ideally from start till finish?
[^pgsql_error_in_the_callback.txt]
[^pgsql_error_stack.txt]
h2. How to reproduce the issue using our [tutorial|https://github.com/debezium/debezium-examples/tree/main/tutorial] deployment?
h1. Feature request or enhancement
For feature requests or enhancements, provide this information, please:
h2. Which use case/requirement will be addressed by the proposed feature?
h2. Implementation ideas (optional)
Contributor guide
Research direction
Start by examining the PostgreSQL connector stack trace, especially PostgresStreamingChangeEventSource and PostgresReplicationConnection, alongside the supplied connector configuration. Check how the configured publication is created and used with PostgreSQL 14 and pgoutput; the reported failure is that publication "relation_cdc_server_1871754362766819329" does not exist during the change callback. Done means identifying why the connector encounters the missing publication and verifying that streaming no longer fails.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kafka, postgresql
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 37/100