pgsql: Fix old visibility bug in HeapTupleSatisfiesDirty

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix old visibility bug in HeapTupleSatisfiesDirty
Date: 2013-08-02 21:11:13
Message-ID: E1V5Mcz-0001by-UT@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix old visibility bug in HeapTupleSatisfiesDirty

If a tuple is locked but not updated by a concurrent transaction,
HeapTupleSatisfiesDirty would return that transaction's Xid in xmax,
causing callers to wait on it, when it is not necessary (in fact, if the
other transaction had used a multixact instead of a plain Xid to mark
the tuple, HeapTupleSatisfiesDirty would have behave differently and
*not* returned the Xmax).

This bug was introduced in commit 3f7fbf85dc5b42, dated December 1998,
so it's almost 15 years old now. However, it's hard to see this
misbehave, because before we had NOWAIT the only consequence of this is
that transactions would wait for slightly more time than necessary; so
it's not surprising that this hasn't been reported yet.

Craig Ringer and Andres Freund

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/646b12115a81604fe083d555441d50c8967cee5f

Modified Files
--------------
src/backend/utils/time/tqual.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2013-08-03 16:41:10 pgsql: Make sure float4in/float8in accept all standard spellings of "in
Previous Message Alvaro Herrera 2013-08-02 17:39:13 pgsql: Fix crash in error report of invalid tuple lock