Skip site navigation (1) Skip section navigation (2)

Re: heap_tuple_needs_freeze false positive

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: heap_tuple_needs_freeze false positive
Date: 2012-02-02 16:27:19
Message-ID: 25250.1328200039@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> I'm not convinced that it's a bug.  Suppose that xmax is set but is
> hinted as invalid.

XMAX_INVALID is not a "hint".  When it's set, the contents of the field
must be presumed to be garbage.  Any code failing to adhere to that rule
is broken.

> We process the table and advanced relfrozenxid;
> then, we crash.  After recovery, it's possible that the hint bit is
> gone (after all, setting hint bits isn't WAL-logged).  Now we're in
> big trouble, because the next CLOG lookup on that xmax value might not
> happen until it's been reused, and we might get a different answer
> than before.

I believe we have adequate defenses against that, and even if we did
not, that doesn't make the code in question less wrong.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Jeff JanesDate: 2012-02-02 16:32:28
Subject: Re: Vacuum rate limit in KBps
Previous:From: Tom LaneDate: 2012-02-02 16:04:46
Subject: Re: Refactoring log_newpage

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group