Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 810974763BD for ; Tue, 13 Aug 2002 12:40:06 -0400 (EDT) Received: from mail1.chek.com (krusty.synacor.com [208.197.227.107]) by postgresql.org (Postfix) with SMTP id D878B4763B0 for ; Tue, 13 Aug 2002 12:40:03 -0400 (EDT) Received: (qmail 20971 invoked by uid 0); 13 Aug 2002 16:40:09 -0000 Received: from perthesep.installs.com (HELO host112.installs.ops) (206.24.104.131) by krusty.synacor.com with SMTP; 13 Aug 2002 16:40:09 -0000 Subject: Re: Leftover processes on shutdown - Debian+JDBC From: "Robert M. Meyer" To: Tom Lane Cc: nickf@ontko.com, pgsql-jdbc , pgsql-admin In-Reply-To: <26784.1029255629@sss.pgh.pa.us> References: <1029252347.28282.15.camel@skymaster> <26784.1029255629@sss.pgh.pa.us> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2-5mdk Date: 13 Aug 2002 12:36:22 -0400 Message-Id: <1029256582.28282.38.camel@skymaster> Mime-Version: 1.0 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/151 X-Sequence-Number: 5266 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" 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