v2-0001-Add-a-log-if-remote-slot-didn-t-catch-up-to-local.patch
application/octet-stream
Filename: v2-0001-Add-a-log-if-remote-slot-didn-t-catch-up-to-local.patch
Type: application/octet-stream
Part: 0
Patch
Format: format-patch
Series: patch v2-0001
Subject: Add a log if remote slot didn't catch up to locally reserved position
| File | + | − |
|---|---|---|
| src/backend/replication/logical/slotsync.c | 11 | 0 |
From 1fce04d95878fd854aec211d2fe3135183d8ee64 Mon Sep 17 00:00:00 2001
From: Hou Zhijie <houzj.fnst@cn.fujitsu.com>
Date: Thu, 15 Feb 2024 11:17:43 +0800
Subject: [PATCH v2 1/2] Add a log if remote slot didn't catch up to locally
reserved position
---
src/backend/replication/logical/slotsync.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/backend/replication/logical/slotsync.c b/src/backend/replication/logical/slotsync.c
index 0aa1bf1ad2..f130d2d579 100644
--- a/src/backend/replication/logical/slotsync.c
+++ b/src/backend/replication/logical/slotsync.c
@@ -361,7 +361,18 @@ update_and_persist_local_synced_slot(RemoteSlot *remote_slot, Oid remote_dbid)
* current location when recreating the slot in the next cycle. It may
* take more time to create such a slot. Therefore, we keep this slot
* and attempt the synchronization in the next cycle.
+ *
+ * XXX should this be changed to elog(DEBUG1) perhaps?
*/
+ ereport(LOG,
+ errmsg("could not sync slot information as remote slot precedes local slot:"
+ " remote slot \"%s\": LSN (%X/%X), catalog xmin (%u) local slot: LSN (%X/%X), catalog xmin (%u)",
+ remote_slot->name,
+ LSN_FORMAT_ARGS(remote_slot->restart_lsn),
+ remote_slot->catalog_xmin,
+ LSN_FORMAT_ARGS(slot->data.restart_lsn),
+ slot->data.catalog_xmin));
+
return;
}
--
2.30.0.windows.2