Re: What is the graceful way to stop (kill) postmaster?

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: What is the graceful way to stop (kill) postmaster?
Дата
Msg-id 201002021958.35716.adrian.klaver@gmail.com
обсуждение исходный текст
Ответ на What is the graceful way to stop (kill) postmaster?  ("Wang, Mary Y" <mary.y.wang@boeing.com>)
Список pgsql-general
On Tuesday 02 February 2010 5:39:32 pm Wang, Mary Y wrote:
> Hi,
>
> What is the graceful way to stop(kill) postmaster?   I didn't use pg_ctl to
> start so I won't use pg_ctl stop the postmaster.  I used
> '/usr/bin/postmaster -D /var/lib/pgsql/data -i&'.   I was told not to use
> 'kill -9'.
>
> Mary
>
>
> ------------------------------------------------
> Mary Y Wang

See here:
http://www.postgresql.org/docs/8.4/interactive/app-postgres.html

In particular:

"Notes

The utility command pg_ctl can be used to start and shut down the postgres
server safely and comfortably.

If at all possible, do not use SIGKILL to kill the main postgres server. Doing
so will prevent postgres from freeing the system resources (e.g., shared memory
and semaphores) that it holds before terminating. This might cause problems for
starting a fresh postgres run.

To terminate the postgres server normally, the signals SIGTERM, SIGINT, or
SIGQUIT can be used. The first will wait for all clients to terminate before
quitting, the second will forcefully disconnect all clients, and the third will
quit immediately without proper shutdown, resulting in a recovery run during
restart.

The SIGHUP signal will reload the server configuration files. It is also
possible to send SIGHUP to an individual server process, but that is usually
not sensible.

To cancel a running query, send the SIGINT signal to the process running that
command.

The postgres server uses SIGTERM to tell subordinate server processes to quit
normally and SIGQUIT to terminate without the normal cleanup. These signals
should not be used by users. It is also unwise to send SIGKILL to a server
process — the main postgres process will interpret this as a crash and will
force all the sibling processes to quit as part of its standard crash-recovery
procedure. '



--
Adrian Klaver
adrian.klaver@gmail.com

В списке pgsql-general по дате отправления:

Предыдущее
От: Lew
Дата:
Сообщение: Re: PostgreSQL licence
Следующее
От: Yan Cheng Cheok
Дата:
Сообщение: Need Advice In Improving Database Disc Usage