pgsql: Be sure to release proc->backendLock after SetupLockInTable() fa - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Be sure to release proc->backendLock after SetupLockInTable() fa
Date
Msg-id E1VmWeo-0005sQ-Rb@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Be sure to release proc->backendLock after SetupLockInTable() failure.

The various places that transferred fast-path locks to the main lock table
neglected to release the PGPROC's backendLock if SetupLockInTable failed
due to being out of shared memory.  In most cases this is no big deal since
ensuing error cleanup would release all held LWLocks anyway.  But there are
some hot-standby functions that don't consider failure of
FastPathTransferRelationLocks to be a hard error, and in those cases this
oversight could lead to system lockup.  For consistency, make all of these
places look the same as FastPathTransferRelationLocks.

Noted while looking for the cause of Dan Wood's bugs --- this wasn't it,
but it's a bug anyway.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/f0e3e05ddab7df93db74f4d191a246f4942f5bd7

Modified Files
--------------
src/backend/storage/lmgr/lock.c |    3 +++
1 file changed, 3 insertions(+)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Be sure to release proc->backendLock after SetupLockInTable() fa
Next
From: Tom Lane
Date:
Subject: pgsql: Fix assorted issues in pg_ctl's pgwin32_CommandLine().