Skip to content

Commit 0726c76

Browse files
committed
Restore lock level to set vacuum flags
Commit 2783898 mistakenly reduced the lock level from exclusive to shared that is acquired to set PGPROC->statusFlags; this was reverted by dcfff74, but failed to do so in one spot. Fix it. Backpatch to 14. Noted by Andres Freund. Discussion: https://postgr.es/m/20211111020724.ggsfhcq3krq5r4hb@alap3.anarazel.de
1 parent db9f287 commit 0726c76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/replication/slot.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ ReplicationSlotRelease(void)
512512
MyReplicationSlot = NULL;
513513

514514
/* might not have been set when we've been a plain slot */
515-
LWLockAcquire(ProcArrayLock, LW_SHARED);
515+
LWLockAcquire(ProcArrayLock, LW_EXCLUSIVE);
516516
MyProc->statusFlags &= ~PROC_IN_LOGICAL_DECODING;
517517
ProcGlobal->statusFlags[MyProc->pgxactoff] = MyProc->statusFlags;
518518
LWLockRelease(ProcArrayLock);

0 commit comments

Comments
 (0)