pgsql: Minor adjustments to make failures in startup/shutdown behave

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Minor adjustments to make failures in startup/shutdown behave
Date: 2006-11-30 18:29:12
Message-ID: 20061130182912.D743D9FA170@postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Minor adjustments to make failures in startup/shutdown behave more cleanly.
StartupXLOG and ShutdownXLOG no longer need to be critical sections, because
in all contexts where they are invoked, elog(ERROR) would be translated to
elog(FATAL) anyway. (One change in bgwriter.c is needed to make this true:
set ExitOnAnyError before trying to exit. This is a good fix anyway since
the existing code would have gone into an infinite loop on elog(ERROR) during
shutdown.) That avoids a misleading report of PANIC during semi-orderly
failures. Modify the postmaster to include the startup process in the set of
processes that get SIGTERM when a fast shutdown is requested, and also fix it
to not try to restart the bgwriter if the bgwriter fails while trying to write
the shutdown checkpoint. Net result is that "pg_ctl stop -m fast" does
something reasonable for a system in warm standby mode, and so should Unix
system shutdown (ie, universal SIGTERM). Per gripe from Stephen Harris and
some corner-case testing of my own.

Modified Files:
--------------
pgsql/src/backend/access/transam:
xlog.c (r1.257 -> r1.258)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c.diff?r1=1.257&r2=1.258)
pgsql/src/backend/postmaster:
bgwriter.c (r1.31 -> r1.32)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/bgwriter.c.diff?r1=1.31&r2=1.32)
postmaster.c (r1.504 -> r1.505)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/postmaster.c.diff?r1=1.504&r2=1.505)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2006-11-30 20:50:44 pgsql: Fix typos
Previous Message User Qnex 2006-11-30 16:22:52 press - pr: And a place update.