pgsql: Fix WaitOnLock() to ensure that the process's "waiting" flag is

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix WaitOnLock() to ensure that the process's "waiting" flag is
Date: 2008-02-02 22:26:17
Message-ID: 20080202222617.57341754108@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix WaitOnLock() to ensure that the process's "waiting" flag is reset after
erroring out of a wait. We can use a PG_TRY block for this, but add a comment
explaining why it'd be a bad idea to use it for any other state cleanup.

Back-patch to 8.2. Prior releases had the same issue, but only with respect
to the process title, which is likely to get reset almost immediately anyway
after the transaction aborts, so it seems not worth changing them. In 8.2
and HEAD, the pg_stat_activity "waiting" flag could remain set incorrectly
for a long time.

Per report from Gurjeet Singh.

Modified Files:
--------------
pgsql/src/backend/storage/lmgr:
lock.c (r1.180 -> r1.181)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/lock.c?r1=1.180&r2=1.181)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2008-02-02 22:26:23 pgsql: Fix WaitOnLock() to ensure that the process's "waiting" flag is
Previous Message User Okbob 2008-02-02 21:40:46 orafce - orafce: remove 7.4 forgotten code