pgsql: Fix HeapTupleSatisfiesVacuum on aborted updater xacts

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix HeapTupleSatisfiesVacuum on aborted updater xacts
Date: 2013-07-19 23:59:47
Message-ID: E1V0KaR-0006q3-H0@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix HeapTupleSatisfiesVacuum on aborted updater xacts

By using only the macro that checks infomask bits
HEAP_XMAX_IS_LOCKED_ONLY to verify whether a multixact is not an
updater, and not the full HeapTupleHeaderIsOnlyLocked, it would come to
the wrong result in case of a multixact containing an aborted update;
therefore returning the wrong result code. This would cause predicate.c
to break completely (as in bug report #8273 from David Leverton), and
certain index builds would misbehave. As far as I can tell, other
callers of the bogus routine would make harmless mistakes or not be
affected by the difference at all; so this was a pretty narrow case.

Also, no other user of the HEAP_XMAX_IS_LOCKED_ONLY macro is as
careless; they all check specifically for the HEAP_XMAX_IS_MULTI case,
and they all verify whether the updater is InvalidXid before concluding
that it's a valid updater. So there doesn't seem to be any similar bug.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/0b3859f3b607b375cfabb0a95bb4c58a4c1b37ee

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

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2013-07-20 04:36:28 Re: pgsql: Fix regex match failures for backrefs combined with non-greedy q
Previous Message Robert Haas 2013-07-19 14:55:22 pgsql: doc: Fix typos in conversion names.