pgsql: More fixes for shutdown during recovery.

From: rhaas(at)postgresql(dot)org (Robert Haas)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: More fixes for shutdown during recovery.
Date: 2010-05-26 12:32:42
Message-ID: 20100526123242.504927541D2@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
More fixes for shutdown during recovery.

1. If we receive a fast shutdown request while in the PM_STARTUP state,
process it just as we would in PM_RECOVERY, PM_HOT_STANDBY, or PM_RUN.
Without this change, an early fast shutdown followed by Hot Standby causes
the database to get stuck in a state where a shutdown is pending (so no new
connections are allowed) but the shutdown request is never processed unless
we end Hot Standby and enter normal running.

2. Avoid removing the backup label file when a smart or fast shutdown occurs
during recovery. It makes sense to do this once we've reached normal running,
since we must be taking a backup which now won't be valid. But during
recovery we must be recovering from a previously taken backup, and any backup
label file is needed to restart recovery from the right place.

Fujii Masao and Robert Haas

Modified Files:
--------------
pgsql/src/backend/postmaster:
postmaster.c (r1.608 -> r1.609)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/postmaster.c?r1=1.608&r2=1.609)

Browse pgsql-committers by date

  From Date Subject
Next Message User Hinoue 2010-05-26 13:56:18 psqlodbc - psqlodbc: 1.
Previous Message User Sas 2010-05-26 12:08:22 slony1-ctl - slony-ctl: Oups, I forgot the Changelog...