Re: Leftover processes on shutdown - Debian+JDBC

From: "Nick Fankhauser" <nickf(at)ontko(dot)com>
To: "pgsql-admin" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Leftover processes on shutdown - Debian+JDBC
Date: 2002-08-14 19:48:12
Message-ID: NEBBLAAHGLEEPCGOBHDGOECBFJAA.nickf@ontko.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-jdbc

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(at)postgresql(dot)org
> [mailto:pgsql-admin-owner(at)postgresql(dot)org]On Behalf Of Oliver Elphick
> Sent: Tuesday, August 13, 2002 11:56 AM
> To: nickf(at)ontko(dot)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(dot)Elphick(at)lfix(dot)co(dot)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(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Chad R. Larson 2002-08-14 21:24:29 Re: Leftover processes on shutdown - Debian+JDBC
Previous Message Thomas O'Connell 2002-08-14 16:28:32 Re: performance tuning: shared_buffers, sort_mem; swap

Browse pgsql-jdbc by date

  From Date Subject
Next Message Chad R. Larson 2002-08-14 21:24:29 Re: Leftover processes on shutdown - Debian+JDBC
Previous Message Matthias Brunner 2002-08-14 19:29:43 Re: Unexpected EOF on client connection