From b509d1416dc419c1d2a0a72760462100f1f3bc33 Mon Sep 17 00:00:00 2001 From: Georgy Shelkovy Date: Mon, 25 May 2026 15:49:02 +0500 Subject: [PATCH 1/2] Resolve conflicts in src/backend/replication/syncrep.c Commit be9788e in src/backend/replication/syncrep.c in the SyncRepWaitForLSN function moved the conditional return higher, adding additional conditions and a large comment. Commit e174f69 added an InterruptHoldoffCount assertion before it. However, the earlier commit 6b0e52b had already added a debug log in the same location, and commit 33a6433 added an assertion before it. --- src/backend/replication/syncrep.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/backend/replication/syncrep.c b/src/backend/replication/syncrep.c index b4d61d7be9d6..817b2760a709 100644 --- a/src/backend/replication/syncrep.c +++ b/src/backend/replication/syncrep.c @@ -160,8 +160,6 @@ SyncRepWaitForLSN(XLogRecPtr lsn, bool commit) const char *old_status; int mode; -<<<<<<< HEAD -======= /* * This should be called while holding interrupts during a transaction * commit to prevent the follow-up shared memory queue cleanups to be @@ -187,27 +185,17 @@ SyncRepWaitForLSN(XLogRecPtr lsn, bool commit) !((volatile WalSndCtlData *) WalSndCtl)->sync_standbys_defined) return; ->>>>>>> f81e97d0475cd4bc597adc23b665bd84fbf79a0d /* Cap the level for anything other than commit to remote flush only. */ if (commit) mode = SyncRepWaitMode; else mode = Min(SyncRepWaitMode, SYNC_REP_WAIT_FLUSH); -<<<<<<< HEAD Assert(!am_walsender); elogif(debug_walrepl_syncrep, LOG, "syncrep wait -- This backend's commit LSN for syncrep is %X/%X.", (uint32) (lsn >> 32), (uint32) lsn); - /* - * Fast exit if user has not requested sync replication. - */ - if (!SyncRepRequested()) - return; - -======= ->>>>>>> f81e97d0475cd4bc597adc23b665bd84fbf79a0d Assert(SHMQueueIsDetached(&(MyProc->syncRepLinks))); Assert(WalSndCtl != NULL); From 0210f28f0ed4fd8c53fd55c7357d050f6b2dd68a Mon Sep 17 00:00:00 2001 From: Georgy Shelkovy Date: Fri, 29 May 2026 14:18:37 +0500 Subject: [PATCH 2/2] rm --- src/backend/replication/syncrep.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/backend/replication/syncrep.c b/src/backend/replication/syncrep.c index 817b2760a709..26fde93d3457 100644 --- a/src/backend/replication/syncrep.c +++ b/src/backend/replication/syncrep.c @@ -160,13 +160,6 @@ SyncRepWaitForLSN(XLogRecPtr lsn, bool commit) const char *old_status; int mode; - /* - * This should be called while holding interrupts during a transaction - * commit to prevent the follow-up shared memory queue cleanups to be - * influenced by external interruptions. - */ - Assert(InterruptHoldoffCount > 0); - /* * Fast exit if user has not requested sync replication, or there are no * sync replication standby names defined.