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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers