Re: bug of recovery? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: bug of recovery?
Date
Msg-id 889.1317069556@sss.pgh.pa.us
Whole thread Raw
In response to Re: bug of recovery?  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: bug of recovery?
List pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes:
> On Mon, Sep 26, 2011 at 10:50 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
>> To prevent the above problem, we should write the contents of the hash table to
>> the disk for every restartpoints, I think. Then, when the server
>> starts recovery,
>> it should reload the hash table from the disk. Thought? Am I missing something?

> That doesn't happen because the when we stop the server it will
> restart from a valid restartpoint - one where there is no in-progress
> multi-phase operation.

Not clear that that's true.  The larger point though is that the
invalid-page table is only interesting during crash recovery --- once
you've reached a consistent state, it should be empty and remain so.
So I see no particular value in Fujii's proposal of logging the table to
disk during standby mode.

It might be worthwhile to invoke XLogCheckInvalidPages() as soon as
we (think we) have reached consistency, rather than leaving it to be
done only when we exit recovery mode.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [v9.2] Fix Leaky View Problem
Next
From: Tom Lane
Date:
Subject: Re: [v9.2] Fix Leaky View Problem