From: Peter Koczan <pjkoczan@gmail.com>
To: Tena Sakai <tsakai@gallo.ucsf.edu>
Cc: Scott Marlowe <scott.marlowe@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: it refuses to go down...
Date: Tue, 25 Mar 2008 12:59:17 -0500
Message-ID: <4544e0330803251059v57938d71q68e41cacda057160@mail.gmail.com> (raw)
In-Reply-To: <FE44E0D7EAD2ED4BB2165071DB8E328C0378F156@egcrc-ex01.egcrc.org>
References: <FE44E0D7EAD2ED4BB2165071DB8E328C0378F152@egcrc-ex01.egcrc.org>
<dcc563d10803241537t2f8940eem7220ea2925a9eafc@mail.gmail.com>
<FE44E0D7EAD2ED4BB2165071DB8E328C0378F156@egcrc-ex01.egcrc.org>
> > did you try pg_ctl -m immediate stop ???
>
> I just did, and it worked.
>
> $ pg_ctl stop -m immediate
> waiting for server to shut down.... done
> server stopped
I'd be careful about shutting down using "immediate" mode. It forces
the database into recovery mode.
Your problem could be that one or two connections are in a weird state
and even "fast" stopping can't kill them. Next time you have to
restart the server, you should check on the status of connections and
see if any are in a weird state. I had to deal with this recently
where the status was "notify interrupt" and I couldn't even stop fast.
I had to change some application code, but not much.
Just run "ps ax | grep post" (or whatever options you like to give ps
to show all processes) to filter out postgres processes. A connection
entry will look like like.
[pid] ? Ss 0:00 postgres: [user] [database] [client] [status]
Peter
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: pjkoczan@gmail.com, tsakai@gallo.ucsf.edu, scott.marlowe@gmail.com
Subject: Re: it refuses to go down...
In-Reply-To: <4544e0330803251059v57938d71q68e41cacda057160@mail.gmail.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