Re: Hot standby, recovery infra

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hot standby, recovery infra
Date: 2009-01-29 17:20:20
Message-ID: 4981E554.9030907@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas wrote:
> It looks like if you issue a fast shutdown during recovery, postmaster
> doesn't kill bgwriter.

Hmm, seems like we haven't thought through how shutdown during
consistent recovery is supposed to behave in general. Right now, smart
shutdown doesn't do anything during consistent recovery, because the
startup process will just keep going. And fast shutdown will simply
ExitPostmaster(1), which is clearly not right.

I'm thinking that in both smart and fast shutdown, the startup process
should exit in a controlled way as soon as it's finished with the
current WAL record, and set minSafeStartPoint to the current point in
the replay.

I wonder if bgwriter should perform a restartpoint before exiting?
You'll have to start with recovery on the next startup anyway, but at
least we could minimize the amount of WAL that needs to be replayed.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stefan Kaltenbrunner 2009-01-29 17:29:37 Re: Commitfest infrastructure (was Re: 8.4 release planning)
Previous Message Robert Haas 2009-01-29 17:03:45 Re: 8.4 release planning