Re: Shutting down a warm standby database in 8.2beta3
Stephen Harris <lists@spuddy.org>
From: Stephen Harris <lists@spuddy.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Date: 2006-11-23T19:38:27Z
Lists: pgsql-hackers, pgsql-general
On Thu, Nov 23, 2006 at 01:18:06PM -0500, Stephen Harris wrote: > Hmm, on Linux I did a kill -QUIT on the process group and then rather > than cleanly exiting my recovery script I "kill -9"d it. The database > still completed recovery as previously described. OK, I just did the same tests on the CVS tree, rather than beta3 and I see different results. This time recovery aborts with a PANIC. I did a "pg_ctl stop -m i" and then kill -9'd the recovery script and: LOG: restored log file "000000010000000000000006" from archive Looking for 000000010000000000000007 LOG: received immediate shutdown request /tmp/rr: line 12: 22031 Quit sleep 5 PANIC: could not restore file "000000010000000000000007" from archive: return code 9 Similar behaviour was seen with "smart" and "fast" shutdowns. Looking for 000000010000000000000005 Restoring 000000010000000000000005 to pg_xlog/RECOVERYXLOG LOG: restored log file "000000010000000000000005" from archive LOG: checkpoint record is at 0/5000020 LOG: redo record is at 0/5000020; undo record is at 0/0; shutdown FALSE LOG: next transaction ID: 0/601; next OID: 24577 LOG: next MultiXactId: 1; next MultiXactOffset: 0 LOG: automatic recovery in progress LOG: redo starts at 0/5000068 Looking for 000000010000000000000006 Restoring 000000010000000000000006 to pg_xlog/RECOVERYXLOG LOG: restored log file "000000010000000000000006" from archive Looking for 000000010000000000000007 LOG: received fast shutdown request PANIC: could not restore file "000000010000000000000007" from archive: return code 9 LOG: startup process (PID 22246) was terminated by signal 6 LOG: aborting startup due to startup process failure Restarting the database appears to go back to asking for archive log 5 again. I'll have to do some testing with more archives to see how far back we have to go. -- rgds Stephen