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