Re: PageIsAllVisible()'s trustworthiness in Hot Standby - Mailing list pgsql-hackers

From Robert Haas
Subject Re: PageIsAllVisible()'s trustworthiness in Hot Standby
Date
Msg-id CA+Tgmob0Ocn6M=BQoPDkSMa9Hy1Xg2o=Zx8j-trHS-Vou3Zw2A@mail.gmail.com
Whole thread Raw
In response to Re: PageIsAllVisible()'s trustworthiness in Hot Standby  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On Tue, Dec 4, 2012 at 10:38 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> I wonder if we could solve that by having an in-memory-only LSN that
> only interlocks the hint bit writes, but doesn't cause full page
> writes...

It's not really a hint bit, because if it fails to get set when the
visibility map bit gets set, you've got queries returning wrong
answers, because the next insert/update/delete on the heap page will
fail to clear the visibility-map bit.

But leaving that aside, I think that might work.  You'd essentially be
preventing the page from being written out of shared_buffers until the
WAL record has hit the disk, and it seems like that should be
sufficient.  Whether it's worth adding that much mechanism for this
problem, I'm less sure about.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Michael Meskes
Date:
Subject: Re: [PATCH] Patch to fix libecpg.so for isinf missing
Next
From: Heikki Linnakangas
Date:
Subject: Re: Switching timeline over streaming replication