pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nick Fankhauser <nickf@ontko.com>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Leftover processes on shutdown - Debian+JDBC
Date: Wed, 14 Aug 2002 14:48:12 -0500
Message-ID: <NEBBLAAHGLEEPCGOBHDGOECBFJAA.nickf@ontko.com> (raw)
In-Reply-To: <1029257778.1135.616.camel@linda>

Hi Folks-

After gleaning some good info from everyone's responses yesterday, I tried a
couple of changes on the Debian start/stop script today, and here is what I
learned:

First, I removed the old commands to stop postgresql & substituted:

pg_ctl stop -m smart

Then I tried shutting down postgresql without first shutting down Tomcat, so
the persistent connections remained. This is the response I got:

morgai:/home/nickf# /etc/init.d/postgresql stop
Stopping PostgreSQL database: postmaster
waiting for postmaster to shut
down................................................................ failed
pg_ctl: postmaster does not shut down
.


Then I tried again, & shut down tomcat from another session after a few
seconds so the connections would go away, and got this response:

morgai:/home/nickf# /etc/init.d/postgresql stop
Stopping PostgreSQL database: postmaster
waiting for postmaster to shut down..........done
postmaster successfully shut down
.


So far, so good.

Then I tried changing "smart" to "fast", and did the same two tests. The
results were exactly the same, so apparently "fast" mode does not forcibly
disconnect clients as the Docs state. (I'm looking at:
http://www.postgresql.org/idocs/index.php?app-pg-ctl.html)

Just to cover all of the bases, I also tried "immediate" mode (on a
development database <grin>) and confirmed that it does indeed force an
immediate shutdown.

As I mentioned in my original post, the simple workaround on the "fast"
problem is to just not do something silly like neglect to shut down my
client before shutting down the backend, so this is not an urgent issue for
me, but it does appear to either be a bug or a misunderstanding of the Docs
on my part.

-Nick




> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Oliver Elphick
> Sent: Tuesday, August 13, 2002 11:56 AM
> To: nickf@ontko.com
> Cc: Robert M. Meyer; pgsql-admin
> Subject: Re: [ADMIN] Leftover processes on shutdown - Debian+JDBC
>
>
> On Tue, 2002-08-13 at 16:55, Nick Fankhauser wrote:
>
> > On the other hand, it looks like pg_ctl functions in a similar
> role, so it
> > may be possible to just substitute one utility for the other. If you did
> > this in Debian, I'd like to know if you were able to make a simple
> > substitution.
> >
> > If it works well, we should suggest the change to Oliver Elphick for the
> > next Debian package release.
>
> I'll be happy to accept a patch.
>
> --
> Oliver Elphick                                Oliver.Elphick@lfix.co.uk
> Isle of Wight, UK
> http://www.lfix.co.uk/oliver
> GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
>                  ========================================
>      "Watch ye therefore, and pray always, that ye may be
>       accounted worthy to escape all these things that shall
>       come to pass, and to stand before the Son of man."
>                                Luke 21:36
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>




view thread (17+ messages)  latest in thread

Message-ID: <NEBBLAAHGLEEPCGOBHDGOECBFJAA.nickf@ontko.com>
Permalink:  ../NEBBLAAHGLEEPCGOBHDGOECBFJAA.nickf@ontko.com/
Also on:    postgresql.org/message-id/NEBBLAAHGLEEPCGOBHDGOECBFJAA.nickf@ontko.com

 · 

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: nickf@ontko.com
  Subject: Re: Leftover processes on shutdown - Debian+JDBC
  In-Reply-To: <NEBBLAAHGLEEPCGOBHDGOECBFJAA.nickf@ontko.com>
  References: <1029257778.1135.616.camel@linda> <NEBBLAAHGLEEPCGOBHDGOECBFJAA.nickf@ontko.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