From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruno Wolff III <bruno(at)wolff(dot)to> |
Cc: | dlangschied <dlangschied(at)ameritech(dot)net>, pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Automatic shutdown from Linux. |
Date: | 2003-05-09 13:04:37 |
Message-ID: | 109.1052485477@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Bruno Wolff III <bruno(at)wolff(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | David W Noon | 2003-05-09 13:21:38 | Re: Automatic shutdown from Linux. |
Previous Message | dlangschied | 2003-05-09 13:00:40 | Re: Automatic shutdown from Linux. |