Re: Crash safe visibility map vs hint bits - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Crash safe visibility map vs hint bits
Date
Msg-id 4CF9F249.7@enterprisedb.com
Whole thread Raw
In response to Crash safe visibility map vs hint bits  ("Jesper@Krogh.cc" <jesper@krogh.cc>)
Responses Re: Crash safe visibility map vs hint bits  ("Jesper@Krogh.cc" <jesper@krogh.cc>)
Re: Crash safe visibility map vs hint bits  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On 04.12.2010 09:14, Jesper@Krogh.cc wrote:
> There has been a lot discussion about index-only scans and how to make the visibillity map crash safe. Then followed
bya good discussion about hint bits.
 
>
> What seems to be the main concern is the added wal volume and it makes me wonder if there is a way in-between that
looksmore like hint bits.
 
>
> How about lazily wal-log the complete visibility map say every X minutes or N amount of tuple updates and make the
walrecovery jobs of rechecking visibility of pages touched by the wal stream on recovery.
 

If you WAL-log the visibility map changes after-the-fact, it doesn't 
solve the race condition we're struggling with: the visibility map 
change might hit the disk before the PD_ALL_VISIBLE to the heap page. If 
you crash, you can end up with a situation where the PD_ALL_VISIBLE flag 
on the heap page is not set, but the bit in the visibility map is. Which 
causes serious issues later on.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: "Jesper@Krogh.cc"
Date:
Subject: Crash safe visibility map vs hint bits
Next
From: Heikki Linnakangas
Date:
Subject: Re: Streaming replication document