Hi, While unlikely to cause issues two new LWLockAcquire calls use the wrong locking mode. Patch attached.
Andres
From e70524baa7399972e51345d81b50377d7f15196d Mon Sep 17 00:00:00 2001 From: Andres Freund <and...@anarazel.de> Date: Sun, 27 Dec 2009 17:28:39 +0100 Subject: [PATCH 1/2] Use correct locking at two functions used by Hot Standby - while not likely to cause issues in reality its better to be correct. --- src/backend/storage/ipc/procarray.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c index 85f14f6..8e2de35 100644 --- a/src/backend/storage/ipc/procarray.c +++ b/src/backend/storage/ipc/procarray.c @@ -1648,7 +1648,7 @@ GetConflictingVirtualXIDs(TransactionId limitXmin, Oid dbOid, errmsg("out of memory"))); } - LWLockAcquire(ProcArrayLock, LW_EXCLUSIVE); + LWLockAcquire(ProcArrayLock, LW_SHARED); /* * If we don't know the TransactionId that created the conflict, set @@ -1710,7 +1710,7 @@ CancelVirtualTransaction(VirtualTransactionId vxid, int cancel_mode) int index; pid_t pid = 0; - LWLockAcquire(ProcArrayLock, LW_SHARED); + LWLockAcquire(ProcArrayLock, LW_EXCLUSIVE); for (index = 0; index < arrayP->numProcs; index++) { -- 1.6.5.12.gd65df24
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers