Re: pg_ctl: server does not shut down

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: pg_ctl: server does not shut down
Дата
Msg-id 4CC5A0C6.8080901@2ndquadrant.com
обсуждение исходный текст
Ответ на pg_ctl: server does not shut down  ("Gnanakumar" <gnanam@zoniac.com>)
Ответы Re: pg_ctl: server does not shut down
Список pgsql-admin
Gnanakumar wrote:
> 1. What could be the root cause of PostgreSQL server not shutting
> down ever?
> 2. Am I following a different/incorrect way of disabling PITR?
>

You can check if PITR is disabled by executing:

SHOW archive_command;

At a psql prompt.  If that's empty, then you turned it off, and it isn't
involved in the shutdown issue you have anymore.

Normally when the server doesn't want to shut down, that's because of a
client that won't exit normally, not something in the main server.  Take
a look at what processes are still running against the database and see
if there are clients attached after the fast shutdown attempt.  If so,
those are your problem, not something to PITR.

If you know every client has been stopped or is doing nothing useful,
you can do an immediate shutdown of the server and kick everyone off.
You'll get messages about unclean shutdown, but no data should be lost.
The "service" scripts don't do that though.  You'll need to do something
like this instead, presuming you start as root:

su postgres
pg_ctl -D /var/lib/pgsql/data -m immedate stop

--
Greg Smith, 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD
PostgreSQL Training, Services and Support  www.2ndQuadrant.us
Author, "PostgreSQL 9.0 High Performance"    Pre-ordering at:
https://www.packtpub.com/postgresql-9-0-high-performance/book


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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: Creating role using batch file in windows
Следующее
От: Nick
Дата:
Сообщение: Re: autovacuum launcher process eating up 17G+ of ram?