Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 931CA4754A8; Tue, 13 Aug 2002 11:12:31 -0400 (EDT) Received: from shire.ontko.com (shire.ontko.com [199.164.165.1]) by postgresql.org (Postfix) with ESMTP id E87564754A3; Tue, 13 Aug 2002 11:12:30 -0400 (EDT) Received: from nick (bilbo.ontko.com [199.164.165.101]) by shire.ontko.com (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id KAA18182; Tue, 13 Aug 2002 10:12:35 -0500 X-Authentication-Warning: shire.ontko.com: Host bilbo.ontko.com [199.164.165.101] claimed to be nick Reply-To: From: "Nick Fankhauser" To: "pgsql-jdbc" , "pgsql-admin" Subject: Leftover processes on shutdown - Debian+JDBC Date: Tue, 13 Aug 2002 10:09:06 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/137 X-Sequence-Number: 5252 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@ontko.com Phone 1.765.935.4283 Fax 1.765.962.9788 Ray Ontko & Co. Software Consulting Services http://www.ontko.com/