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 26979.1291133413@sss.pgh.pa.us
Whole thread Raw
In response to Re: crash-safe visibility map, take three  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: crash-safe visibility map, take three
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> On 30.11.2010 17:38, Tom Lane wrote:
>> Wouldn't it be easier and more robust to just consider VM bit changes to
>> be part of the WAL-logged actions?  That would include updating LSNs on
>> VM pages and flushing VM pages to disk during checkpoint based on their
>> LSN values.  All of these other schemes seem too complicated and not
>> provably correct.

> The vm bit can be set once all the tuples on the page become visible to 
> everyone. There is no WAL-logged action at that point we could piggyback on.

So you start emitting a WAL entry for the act of setting the VM bit
(and I guess the page header hint bit would be included in that too).

> Yeah, I'm not terribly excited about any of these schemes. The "intent" 
> record seems like the simplest one, but even that is quite different 
> from the traditional WAL-logging we do that it makes me slightly nervous.

I'm not convinced it works at all.  Consider write intent record,
checkpoint, set bit, crash before completing vacuum.  There will be
no second intent record at which you could clean up if things are
inconsistent.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alexey Klyukin
Date:
Subject: Another proposal for table synonyms
Next
From: Robert Haas
Date:
Subject: Re: DELETE with LIMIT (or my first hack)