Re: Leftover processes on shutdown - Debian+JDBC

From: "Robert M(dot) Meyer" <rmeyer(at)installs(dot)com>
To: nickf(at)ontko(dot)com
Cc: pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Leftover processes on shutdown - Debian+JDBC
Date: 2002-08-13 15:25:47
Message-ID: 1029252347.28282.15.camel@skymaster
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-jdbc

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 and we
always restart tomcat at some point in the middle of the night, anyway.

Hope this helps...

Cheers!

Bob

On Tue, 2002-08-13 at 11:09, Nick Fankhauser wrote:
> Hi-
>
> I've run across a problem that has a simple workaround, but I wonder if it
> indicates a problem that needs fixing on the postgresql server end.
> Alternately, it may be considered a feature by some...
>
> My environment is PostgreSQL 7.2.1 on Debian Linux 2.4. On the client side,
> I have Tomcat accessing the database using the 7.2 PostgreSQL JDBC Driver.
>
> The problem is that if I attempt to do a PostgreSQL shutdown while tomcat
> still has connections open, the backend processes that have been spawned to
> serve tomcat don't go away. This surprises me because they are owned by
> postgres & hence it seems as if they should be stopped as well.
>
> The simple workaround is to make sure that I shutdown tomcat & make the
> client connections go away first. This is a sensible procedure anyway, so it
> isn't a serious problem.
>
> Since this involves the start/stop script, I suppose it may be
> Debian-specific. It also involves the JDBC driver, but I'm guessing that
> this behavior could occur with other client connections.
>
> I have tried to make the same thing happen by leaving a psql connection
> open, but the shutdown is complete in that case, and attempting further
> access through the psql client results in an informative error message &
> then a connection reset, so in the case of psql, the situation is handled
> gracefully.
>
>
> Here is the error message:
>
> morgai:/data1/postgresql# /etc/init.d/postgresql restart
> Restarting PostgreSQL database: postmaster
> Stopped /usr/lib/postgresql/bin/postmaster (pid 321 323 324 5465 5466 5470
> 5471 5472 5473 5474 5475 5476 5477).
> Starting PostgreSQL postmaster.
> pg_ctl: Another postmaster may be running. Trying to start postmaster
> anyway.
> pg_ctl: cannot start postmaster
> Examine the log output.
>
> -Nick
>
> --------------------------------------------------------------------------
> Nick Fankhauser nickf(at)ontko(dot)com Phone 1.765.935.4283 Fax 1.765.962.9788
> Ray Ontko & Co. Software Consulting Services http://www.ontko.com/
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
--
Robert M. Meyer
Sr. Network Administrator
DigiVision Satellite Services
14 Lafayette Sq, Ste 410
Buffalo, NY 14203-1904
(716)332-1451

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Thomas O'Connell 2002-08-13 15:42:12 performance tuning: shared_buffers, sort_mem; swap
Previous Message Chris Gamache 2002-08-13 15:14:40 Runaway SELECT

Browse pgsql-jdbc by date

  From Date Subject
Next Message Nick Fankhauser 2002-08-13 15:55:56 Re: Leftover processes on shutdown - Debian+JDBC
Previous Message Nick Fankhauser 2002-08-13 15:09:06 Leftover processes on shutdown - Debian+JDBC