From: Greg Smith <greg@2ndquadrant.com>
To: gnanam@zoniac.com
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_ctl: server does not shut down
Date: Mon, 25 Oct 2010 11:22:46 -0400
Message-ID: <4CC5A0C6.8080901@2ndquadrant.com> (raw)
In-Reply-To: <002d01cb7417$595f78d0$0c1e6a70$@com>
References: <001201cb0321$df429d40$9dc7d7c0$@com>
<00ca01cb03dc$a9ffe780$fdffb680$@com>
<002d01cb7417$595f78d0$0c1e6a70$@com>
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
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: greg@2ndquadrant.com, gnanam@zoniac.com
Subject: Re: pg_ctl: server does not shut down
In-Reply-To: <4CC5A0C6.8080901@2ndquadrant.com>
* 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