pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert M. Meyer <rmeyer@installs.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: nickf@ontko.com, pgsql-jdbc <pgsql-jdbc@postgresql.org>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Leftover processes on shutdown - Debian+JDBC
Date: 13 Aug 2002 12:36:22 -0400
Message-ID: <1029256582.28282.38.camel@skymaster> (raw)
In-Reply-To: <26784.1029255629@sss.pgh.pa.us>
References: <NEBBLAAHGLEEPCGOBHDGCENJFIAA.nickf@ontko.com>
	<1029252347.28282.15.camel@skymaster>
	<26784.1029255629@sss.pgh.pa.us>

Hmmm... You're right.  How much longer does a '-m fast' take.  The
reason I ask is because during a server shutdown, init doesn't wait
around long after the script exits.  The problem with not using the '-m'
is that pg_ctl returns quickly but the DB may not be down, causing the
system to pull the rug out from under it.

Cheers!

Bob

On Tue, 2002-08-13 at 12:20, Tom Lane wrote:
> "Robert M. Meyer" <rmeyer@installs.com> writes:
> > I had the same problem.  I rewrote my shutdown script to call 'pg_ctl -m
> > immediate'.  So far, I haven't seen any damage because of it
> 
> A much safer choice would be "-m fast".
> 
> The default ("-m smart") doesn't shut down the server until all clients
> voluntarily disconnect.  If you have tomcat holding persistent
> connections open then that's not what you want.
> 
> "-m fast" forcibly disconnects clients and then does a clean database
> shutdown.  This is generally what you want if you have
> persistent-connection clients.
> 
> "-m immediate" is the equivalent of the big red EMERGENCY STOP button
> found in places like power plant control rooms.  If you are in the habit
> of hitting that as a routine measure, you need to have your operator's
> permit revoked.
> 
> 			regards, tom lane
-- 
Robert M. Meyer
Sr. Network Administrator
DigiVision Satellite Services
14 Lafayette Sq, Ste 410
Buffalo, NY 14203-1904
(716)332-1451




view thread (17+ messages)  latest in thread

Message-ID: <1029256582.28282.38.camel@skymaster>
Permalink:  ../1029256582.28282.38.camel@skymaster/
Also on:    postgresql.org/message-id/1029256582.28282.38.camel@skymaster

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: rmeyer@installs.com, tgl@sss.pgh.pa.us, pgsql-jdbc@postgresql.org
  Subject: Re: Leftover processes on shutdown - Debian+JDBC
  In-Reply-To: <1029256582.28282.38.camel@skymaster>
  References: <NEBBLAAHGLEEPCGOBHDGCENJFIAA.nickf@ontko.com> <1029252347.28282.15.camel@skymaster> <26784.1029255629@sss.pgh.pa.us> <1029256582.28282.38.camel@skymaster>

* 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