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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy