summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2025-11-25 08:49:46 +0000
committerAmit Kapila <akapila@postgresql.org>2025-11-25 08:49:46 +0000
commit3df4df53b06df2a2af56a77bf44cffa6393534fe (patch)
treee567431f3c3f1dd02d055c2724f6493a70d5f0ca /src
parent76b78721ca49c16dfcbfbd2f4f87fcdb2db2bbb6 (diff)
Fix a BF failure caused by commit 76b78721ca.
The issue occurred because the replication slot was not released in the slotsync worker when a slot synchronization cycle was skipped. This skip happened because the required WAL was not received and flushed on the standby server. As a result, in the next cycle, when attempting to acquire the slot, an assertion failure was triggered. Author: Hou Zhijie <houzj.fnst@fujitsu.com> Discussion: https://postgr.es/m/CAA4eK1KMwYUYy=oAVHu9mam+vX50ixxfhO4_C=kgQC8VCQHEfw@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/backend/replication/logical/slotsync.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/replication/logical/slotsync.c b/src/backend/replication/logical/slotsync.c
index 7e9dc7f18bd..1f4f06d467b 100644
--- a/src/backend/replication/logical/slotsync.c
+++ b/src/backend/replication/logical/slotsync.c
@@ -725,6 +725,8 @@ synchronize_one_slot(RemoteSlot *remote_slot, Oid remote_dbid)
remote_slot->name,
LSN_FORMAT_ARGS(latestFlushPtr)));
+ ReplicationSlotRelease();
+
return slot_updated;
}
@@ -824,6 +826,8 @@ synchronize_one_slot(RemoteSlot *remote_slot, Oid remote_dbid)
remote_slot->name,
LSN_FORMAT_ARGS(latestFlushPtr)));
+ ReplicationSlotRelease();
+
return false;
}