Re: crash-safe visibility map, take three - Mailing list pgsql-hackers

From Tom Lane
Subject Re: crash-safe visibility map, take three
Date
Msg-id 17653.1291222083@sss.pgh.pa.us
Whole thread Raw
In response to Re: crash-safe visibility map, take three  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> On 01.12.2010 18:40, Tom Lane wrote:
>> Um, no it isn't.  Suppose the heap page gets to disk but we crash before
>> the WAL record does.  Now we have a persistent state where the heap page
>> is marked PD_ALL_VISIBLE but the corresponding VM bit is not set.  The
>> VM bit will never become set, either, because operations on the heap
>> page will see PD_ALL_VISIBLE and assume it already is set.  This state
>> of affairs might be acceptable from a correctness standpoint, but not
>> from a performance standpoint.

> The next vacuum will fix it. We already handle that. It's no different 
> from the situation where neither change makes it to the disk.

Well, as long as we're careful not to optimize away setting the VM bit
on the grounds that PD_ALL_VISIBLE is already set, I suppose that will
work.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: crash-safe visibility map, take three
Next
From: Florian Pflug
Date:
Subject: Re: improving foreign key locks