pgsql: Remove logic in XactLockTableWait() that attempted to mark a - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Remove logic in XactLockTableWait() that attempted to mark a
Date
Msg-id 20060113213212.CFE209DD775@postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Remove logic in XactLockTableWait() that attempted to mark a crashed
transaction as aborted.  Since we only call XactLockTableWait on XIDs
that we believe to be currently running, the odds of this code ever
actually firing are minimal.  It's certainly unnecessary, since a
transaction that's not either running or committed will be presumed
aborted anyway.  What's more, it's not hard to imagine scenarios where
this could result in corrupting pg_clog: for instance, if a bogus XID
somehow got passed to XactLockTableWait.  I think the code probably
dates from the ancient era when we didn't have TransactionIdIsInProgress;
back then it may have been necessary, but now I think it's a waste of
cycles and potentially dangerous.  Per discussion with Qingqing Zhou
and Karsten Hilbert.

Modified Files:
--------------
    pgsql/src/backend/storage/lmgr:
        lmgr.c (r1.80 -> r1.81)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/lmgr.c.diff?r1=1.80&r2=1.81)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Document that CREATE OPERATOR CLASS amounts to granting public
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Add selectivity-calculation code for RowCompareExpr nodes.