From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | "Jesper(at)Krogh(dot)cc" <jesper(at)krogh(dot)cc> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Crash safe visibility map vs hint bits |
Date: | 2010-12-04 07:48:25 |
Message-ID: | 4CF9F249.7@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 04.12.2010 09:14, Jesper(at)Krogh(dot)cc wrote:
> There has been a lot discussion about index-only scans and how to make the visibillity map crash safe. Then followed by a 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 looks more 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 wal recovery 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
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2010-12-04 07:53:49 | Re: Streaming replication document |
Previous Message | Jesper@Krogh.cc | 2010-12-04 07:14:45 | Crash safe visibility map vs hint bits |