Re: Automatic shutdown from Linux.
От | Tom Lane |
---|---|
Тема | Re: Automatic shutdown from Linux. |
Дата | |
Msg-id | 109.1052485477@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Automatic shutdown from Linux. (Bruno Wolff III <bruno@wolff.to>) |
Список | pgsql-admin |
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
В списке pgsql-admin по дате отправления: