Re: Proposing pg_hibernate - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Proposing pg_hibernate
Date
Msg-id 20140604135657.GA10482@alap3.anarazel.de
Whole thread Raw
In response to Re: Proposing pg_hibernate  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Proposing pg_hibernate  (Amit Kapila <amit.kapila16@gmail.com>)
Re: Proposing pg_hibernate  (Robert Haas <robertmhaas@gmail.com>)
Re: Proposing pg_hibernate  (Jim Nasby <jim@nasby.net>)
List pgsql-hackers
On 2014-06-04 09:51:36 -0400, Robert Haas wrote:
> On Wed, Jun 4, 2014 at 2:08 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> > On 2014-06-04 10:24:13 +0530, Amit Kapila wrote:
> >> Incase of recovery, the shared buffers saved by this utility are
> >> from previous shutdown which doesn't seem to be of more use
> >> than buffers loaded by recovery.
> >
> > Why? The server might have been queried if it's a hot standby one?
> 
> I think that's essentially the same point Amit is making.  Gurjeet is
> arguing for reloading the buffers from the previous shutdown at end of
> recovery; IIUC, Amit, you, and I all think this isn't a good idea.

I think I am actually arguing for Gurjeet's position. If the server is
actively being queried (i.e. hot_standby=on and actually used for
queries) it's quite reasonable to expect that shared_buffers has lots of
content that is *not* determined by WAL replay.

There's not that much read IO going on during WAL replay anyway - after
a crash/start from a restartpoint most of it is loaded via full page
anyway. So it's only disadvantageous to fault in pages via pg_hibernate
if that causes pages that already have been read in via FPIs to be
thrown out.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Proposing pg_hibernate
Next
From: Tom Lane
Date:
Subject: pg_control is missing a field for LOBLKSIZE