From: Tom Lane <tgl@sss.pgh.pa.us>
To: Edwin Grubbs <edwin@grubbs.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: SIGQUIT vs SIGINT
Date: Tue, 06 Nov 2012 16:53:40 -0500
Message-ID: <20775.1352238820@sss.pgh.pa.us> (raw)
In-Reply-To: <CAAZm=o1sSz7yvGVoigPOALcJ44f6vC7EqNnE+Ygn9jA-CnF2PA@mail.gmail.com>
References: <CAAZm=o1sSz7yvGVoigPOALcJ44f6vC7EqNnE+Ygn9jA-CnF2PA@mail.gmail.com>
Edwin Grubbs <edwin@grubbs.org> writes:
> Redhat cluster comes with a default configuration file for
> postgres-8.4 that by default just sends a SIGQUIT to stop postgres.
Ouch. That's news to me.
> I can't find any more information on why not to use SIGQUIT besides
> the documentation indicating "This is recommended only in
> emergencies." Can you provide any information on why their default
> config should be changed?
You already pointed out the core reason: it results in substantially
increased time to restart the service, because of the need for WAL
replay.
One could also argue that there's an increased risk of data corruption,
because that's a relatively poorly tested shutdown sequence. (Sure,
we would like to think that SIGQUIT is perfectly safe, but it's poorly
tested.) One thought that comes to mind is that because the postmaster
exits without waiting for its children, the postmaster.pid lock file
will be removed before all activity has stopped, meaning that there is a
nonzero risk of data corruption if a new postmaster is started
immediately afterwards.
Another argument is that SIGQUIT does not allow for a clean shutdown
of client connections, which could confuse client-side logic with
difficult-to-predict consequences.
There are probably some other risks I'm not thinking of.
Basically, SIGQUIT is the panic button. You push it when there is a
damn good reason to, not when you are doing a routine shutdown.
http://en.wikipedia.org/wiki/Big_red_button> Here is the bug that I submitted. The comments that I have received
> back are on the support ticket, so you can't see that.
> https://bugzilla.redhat.com/show_bug.cgi?id=871659
FWIW, I've added a private comment to that bugzilla encouraging a
change.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, edwin@grubbs.org
Subject: Re: SIGQUIT vs SIGINT
In-Reply-To: <20775.1352238820@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox