Skip to content

Commit 3df4df5

Browse files
author
Amit Kapila
committed
Fix a BF failure caused by commit 76b7872.
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
1 parent 76b7872 commit 3df4df5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/backend/replication/logical/slotsync.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,8 @@ synchronize_one_slot(RemoteSlot *remote_slot, Oid remote_dbid)
725725
remote_slot->name,
726726
LSN_FORMAT_ARGS(latestFlushPtr)));
727727

728+
ReplicationSlotRelease();
729+
728730
return slot_updated;
729731
}
730732

@@ -824,6 +826,8 @@ synchronize_one_slot(RemoteSlot *remote_slot, Oid remote_dbid)
824826
remote_slot->name,
825827
LSN_FORMAT_ARGS(latestFlushPtr)));
826828

829+
ReplicationSlotRelease();
830+
827831
return false;
828832
}
829833

0 commit comments

Comments
 (0)