It looks like if you issue a fast shutdown during recovery, postmaster doesn't kill bgwriter.

...
LOG:  restored log file "000000010000000000000028" from archive
LOG:  restored log file "000000010000000000000029" from archive
LOG:  consistent recovery state reached at 0/2900005C
...
LOG:  restored log file "00000001000000000000002F" from archive
LOG:  restored log file "000000010000000000000030" from archive
LOG:  restored log file "000000010000000000000031" from archive
LOG:  restored log file "000000010000000000000032" from archive
LOG:  restored log file "000000010000000000000033" from archive
LOG:  restartpoint starting: time
LOG:  restored log file "000000010000000000000034" from archive
LOG:  received fast shutdown request
LOG:  restored log file "000000010000000000000035" from archive
FATAL:  terminating connection due to administrator command
LOG:  startup process (PID 14137) exited with exit code 1
LOG:  aborting startup due to startup process failure
hlinn...@heikkilaptop:~/pgsql$
hlinn...@heikkilaptop:~/pgsql$ LOG: restartpoint complete: wrote 3324 buffers (5.1%); write=13.996 s, sync=2.016 s, total=16.960 s
LOG:  recovery restart point at 0/3000FA14

Seems that reaper() needs to be taught that bgwriter can be active during consistent recovery. I'll take a look at how to do that.


BTW, the message "terminating connection ..." is a bit misleading. It's referring to the startup process, which is hardly a connection. We have that in CVS HEAD too, so it's not something introduced by the patch, but seems worth changing in HS, since we then let real connections in while startup process is still running.

--
  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

Reply via email to