Skip to content

Commit 17a6fb5

Browse files
kvapkelvich
authored andcommitted
Show PQerrorMessage when logical receiver fails to establish connection.
1 parent 0ac0d83 commit 17a6fb5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pglogical_receiver.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,11 @@ pglogical_receiver_main(Datum main_arg)
261261

262262
/* Establish connection to remote server */
263263
conn = PQconnectdb(connString);
264-
if (PQstatus(conn) != CONNECTION_OK)
264+
ConnStatusType status = PQstatus(conn);
265+
if (status != CONNECTION_OK)
265266
{
266-
ereport(WARNING, (errmsg("%s: Could not establish connection to remote server",
267-
worker_proc)));
267+
ereport(WARNING, (errmsg("%s: Could not establish connection to remote server (%s), status = %d, error = %s",
268+
worker_proc, connString, status, PQerrorMessage(conn))));
268269
goto OnError;
269270
}
270271

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy