Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2024-07-11 17:21:13 +0000
committerTom Lane2024-07-11 17:21:13 +0000
commit0d8bd0a72ea284ffb1d1154efbe799241cc5edc6 (patch)
treea02394fd7eede77c17ed5ae77996202339c39cc4 /src/backend/commands/subscriptioncmds.c
parenta0f1fce80c0373c16b22a1bdc9b0b61958fc9b6a (diff)
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/commands/subscriptioncmds.c')
-rw-r--r--src/backend/commands/subscriptioncmds.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index e407428dbcf..16d83b32539 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -755,7 +755,8 @@ CreateSubscription(ParseState *pstate, CreateSubscriptionStmt *stmt,
if (!wrconn)
ereport(ERROR,
(errcode(ERRCODE_CONNECTION_FAILURE),
- errmsg("could not connect to the publisher: %s", err)));
+ errmsg("subscription \"%s\" could not connect to the publisher: %s",
+ stmt->subname, err)));
PG_TRY();
{
@@ -888,7 +889,8 @@ AlterSubscription_refresh(Subscription *sub, bool copy_data,
if (!wrconn)
ereport(ERROR,
(errcode(ERRCODE_CONNECTION_FAILURE),
- errmsg("could not connect to the publisher: %s", err)));
+ errmsg("subscription \"%s\" could not connect to the publisher: %s",
+ sub->name, err)));
PG_TRY();
{
@@ -1521,7 +1523,8 @@ AlterSubscription(ParseState *pstate, AlterSubscriptionStmt *stmt,
if (!wrconn)
ereport(ERROR,
(errcode(ERRCODE_CONNECTION_FAILURE),
- errmsg("could not connect to the publisher: %s", err)));
+ errmsg("subscription \"%s\" could not connect to the publisher: %s",
+ sub->name, err)));
PG_TRY();
{