pgsql: Remove logic in XactLockTableWait() that attempted to mark a

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove logic in XactLockTableWait() that attempted to mark a
Date: 2006-01-13 21:32:12
Message-ID: 20060113213212.CFE209DD775@postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2006-01-14 00:14:12 pgsql: Add selectivity-calculation code for RowCompareExpr nodes.
Previous Message Tom Lane 2006-01-13 18:10:25 pgsql: Document that CREATE OPERATOR CLASS amounts to granting public