From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Poul L(dot) Christiansen" <poulc(at)cs(dot)auc(dot)dk> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: shutting down postmasters |
Date: | 2001-01-09 17:49:37 |
Message-ID: | 1593.979062577@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Poul L. Christiansen" <poulc(at)cs(dot)auc(dot)dk> writes:
> When I want to shutdown PostgreSQL, I use the command
> /etc/rc.d/init.d/postgresql stop
> But only pg_ctl and one postmaster stops :-(
"pg_ctl stop" performs a polite shutdown of the database --- ie,
existing clients are allowed to finish their sessions. The postmaster
stops accepting new connections, but doesn't quit until the last
active backend quits.
"pg_ctl -m fast stop" is probably what you are looking for: existing
clients are forcibly disconnected (with rollback of any open
transactions). If you have clients that will sit on open connections
indefinitely, this is the only way to shut down short of killing the
clients.
Dunno if this option can be passed through your
/etc/rc.d/init.d/postgresql script; the script may need some work.
> That means that I have to use the command "top" to see the other
> postmaster processes and kill them one by one.
As was just pointed out on pghackers, manually killing individual
backends is not merely tedious, it is dangerous. Avoid it.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-01-09 17:59:45 | Re: Re: Loading optimization |
Previous Message | T F | 2001-01-09 17:44:52 | Does Postgresql deadlock? |