Re: PageIsAllVisible()'s trustworthiness in Hot Standby

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PageIsAllVisible()'s trustworthiness in Hot Standby
Date: 2012-12-04 16:07:52
Message-ID: CA+Tgmob0Ocn6M=BQoPDkSMa9Hy1Xg2o=Zx8j-trHS-Vou3Zw2A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 4, 2012 at 10:38 AM, Andres Freund <andres(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2012-12-04 16:31:24 Re: Switching timeline over streaming replication
Previous Message Michael Meskes 2012-12-04 15:45:16 Re: [PATCH] Patch to fix libecpg.so for isinf missing