pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruno Wolff III <bruno@wolff.to>
Cc: dlangschied <dlangschied@ameritech.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Automatic shutdown from Linux.
Date: Fri, 09 May 2003 09:04:37 -0400
Message-ID: <109.1052485477@sss.pgh.pa.us> (raw)
In-Reply-To: <20030509125607.GA10138@wolff.to>
References: <002601c31626$229da170$6401a8c0@lcshost>
	<20030509125607.GA10138@wolff.to>

Bruno Wolff III <bruno@wolff.to> writes:
> Probably the init scripts for your system already do this for you.
> If you system displays a message for each service being shutdown
> during a shutdown you should be able to watch and see if postgres
> is shutdown as part of that process.

Also, in a conventionally-run Unix system the database will shut down
cleanly even without any init-script help.  This is because the
postmaster and backends are designed (with malice aforethought ;-))
to interpret SIGTERM as a fast-shutdown request.  Assuming that the
kernel gives user processes a reasonable number of seconds between
SIGTERM and SIGKILL --- enough for a checkpoint --- you don't really
need anything else.

One reason not to crank shared_buffers up to the moon is that with a
huge number of dirty buffers, checkpoint might take too long for this
scenario to be robust.  On my HPUX box, the kernel will give twenty
seconds' grace between SIGTERM and SIGKILL, which is enough for even
a pretty messy checkpoint, but I dunno what the equivalent delay is
on other platforms.

			regards, tom lane




view thread (5+ messages)  latest in thread

Message-ID: <109.1052485477@sss.pgh.pa.us>
Permalink:  ../109.1052485477@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/109.1052485477@sss.pgh.pa.us

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bruno@wolff.to, dlangschied@ameritech.net
  Subject: Re: Automatic shutdown from Linux.
  In-Reply-To: <109.1052485477@sss.pgh.pa.us>
  References: <002601c31626$229da170$6401a8c0@lcshost> <20030509125607.GA10138@wolff.to> <109.1052485477@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