mirror of
https://github.com/postgres/postgres.git
synced 2025-09-08 00:47:37 +03:00
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
This commit is contained in:
@@ -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();
|
||||
{
|
||||
|
Reference in New Issue
Block a user