On Tue, Nov 30, 2010 at 11:40 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> That's definitely sucky, but in some ways it would be more complicated
>> if they did, because I don't think all-visible on the master implies
>> all-visible on the standby.
> Ouch. That seems like it could shoot down all these proposals. There
> definitely isn't any way to make VM crash-safe if there is no WAL-driven
> mechanism for setting the bits.
Heikki's intent method works fine, because the WAL record only clears
the visibility map bits on redo; it never sets them.
> I guess what we need is a way to delay the application of such a WAL
> record on the slave until it's safe, which means the record also has to
> carry some indication of the youngest XMIN on the page.
I'm unexcited about inventing more ways to delay XLOG application on
the standby. We have enough of those already.
We could actually allow the slave to set the visibility map bits based
on its own xmin horizon. The only problem is that you wouldn't be
able to write the intent XLOG records. I suppose you could have a
separate file which is just used to store the intent records, and
designate a range of very-high numbered LSNs to mean blocks of the
intent file rather than a position in the regular WAL stream. VACUUM
is so much fun on the master, let's have it on the standby too.
The Enterprise PostgreSQL Company
In response to
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 2010-11-30 16:55:44|
|Subject: Re: crash-safe visibility map, take three |
|Previous:||From: Heikki Linnakangas||Date: 2010-11-30 16:49:34|
|Subject: Re: crash-safe visibility map, take three|