register_notice_process.patch

application/octet-stream

Filename: register_notice_process.patch
Type: application/octet-stream
Part: 0
Message: Log prefix missing for subscriber log messages received from publisher

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
File+
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c 8 0
diff --git a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
index c650935ef5d..636bf836e32 100644
--- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
+++ b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
@@ -125,6 +125,12 @@ _PG_init(void)
 	WalReceiverFunctions = &PQWalReceiverFunctions;
 }
 
+static void
+notice_processor(void *arg, const char *message)
+{
+	elog(LOG, "%s", message);
+}
+
 /*
  * Establish the connection to the primary server.
  *
@@ -290,6 +296,8 @@ libpqrcv_connect(const char *conninfo, bool replication, bool logical,
 		PQclear(res);
 	}
 
+	PQsetNoticeProcessor(conn->streamConn, notice_processor, NULL);
+
 	conn->logical = logical;
 
 	return conn;