aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication/logical/tablesync.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2024-07-11 13:21:13 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2024-07-11 13:21:13 -0400
commit0d8bd0a72ea284ffb1d1154efbe799241cc5edc6 (patch)
treea02394fd7eede77c17ed5ae77996202339c39cc4 /src/backend/replication/logical/tablesync.c
parenta0f1fce80c0373c16b22a1bdc9b0b61958fc9b6a (diff)
downloadpostgresql-0d8bd0a72ea284ffb1d1154efbe799241cc5edc6.tar.gz
postgresql-0d8bd0a72ea284ffb1d1154efbe799241cc5edc6.zip
Improve logical replication connection-failure messages.
These messages mostly said "could not connect to the publisher: %s" which is lacking context. Add some verbiage to indicate which subscription or worker process is failing. Nisha Moond Discussion: https://postgr.es/m/CABdArM7q1=zqL++cYd0hVMg3u_tc0S=0Of=Um-KvDhLony0cSg@mail.gmail.com
Diffstat (limited to 'src/backend/replication/logical/tablesync.c')
-rw-r--r--src/backend/replication/logical/tablesync.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/replication/logical/tablesync.c b/src/backend/replication/logical/tablesync.c
index b00267f0427..e03e7613926 100644
--- a/src/backend/replication/logical/tablesync.c
+++ b/src/backend/replication/logical/tablesync.c
@@ -1342,7 +1342,8 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
if (LogRepWorkerWalRcvConn == NULL)
ereport(ERROR,
(errcode(ERRCODE_CONNECTION_FAILURE),
- errmsg("could not connect to the publisher: %s", err)));
+ errmsg("table synchronization worker for subscription \"%s\" could not connect to the publisher: %s",
+ MySubscription->name, err)));
Assert(MyLogicalRepWorker->relstate == SUBREL_STATE_INIT ||
MyLogicalRepWorker->relstate == SUBREL_STATE_DATASYNC ||