Re: heap_tuple_needs_freeze false positive - Mailing list pgsql-hackers

From Robert Haas
Subject Re: heap_tuple_needs_freeze false positive
Date
Msg-id CA+TgmoZ+4r0CKPqgi7uWQsFesVsX-hS+EgCh4S94GZPBHxkKUQ@mail.gmail.com
Whole thread Raw
In response to Re: heap_tuple_needs_freeze false positive  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Thu, Feb 2, 2012 at 12:45 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> I believe the adequate defense that we have is precisely the logic you
> are proposing to change.  Regardless of whether you want to call
> XMAX_INVALID a hint or, say, a giant tortoise, I am fairly sure that
> we don't WAL-log setting it.  That means that a bit set before a crash
> won't necessarily still be set after a crash.  But the corresponding
> relfrozenxid advancement will be WAL-logged, leading to the problem
> scenario I described.

To put that another way, the problem isn't that we might have code
somewhere in the system that ignores HEAP_XMAX_INVALID.  The problem
is that HEAP_XMAX_INVALID might not still be set on that tuple the
next time somebody looks at it, if a database crash intervenes after
that bit is set and before it is flushed to disk.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Gilles Darold
Date:
Subject: Re: Patch pg_is_in_backup()
Next
From: Peter Eisentraut
Date:
Subject: ecpglib use PQconnectdbParams