X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 02C8C30F2A2 for ; Tue, 17 Jun 2003 23:39:18 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 04171-06 for ; Tue, 17 Jun 2003 20:39:07 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 2106530F2A8 for ; Tue, 17 Jun 2003 20:39:07 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h5HNd5U6017716; Tue, 17 Jun 2003 19:39:05 -0400 (EDT) To: Charles Hornberger Cc: pgsql-admin@postgresql.org Subject: Re: postmaster dead but backends still running? In-reply-to: <3EEF7AE1.9070909@hss.caltech.edu> References: <3EEF622C.4060908@hss.caltech.edu> <3EEF7AE1.9070909@hss.caltech.edu> Comments: In-reply-to Charles Hornberger message dated "Tue, 17 Jun 2003 13:32:33 -0700" Date: Tue, 17 Jun 2003 19:39:04 -0400 Message-ID: <17715.1055893144@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200306/209 X-Sequence-Number: 9200 Charles Hornberger writes: > Other things I perhaps ought to mention: Trying to stop the postmaster > using pg_ctl fails (unsurprisingly, since pg_ctl relies on > /var/pgsql/data/postmaster.pid, which contains a nonexistent PID); I > haven't tried to start a new postmaster yet, because the old backends > are hanging around. In theory a new postmaster would detect the old backends and refuse to start anyway. I don't trust that interlock unreservedly though. (But please test it while you have the opportunity...) > Nor have I attempted to restart the web server, which might allow the > hanging-round backends to die by closing the old connections it's > holding to them. I'm tempted to go ahead and do this, though I'm not > sure whether I ought to until I've diagnosed what's going on right now. You will need to close all the existing connections before the new postmaster can be started. I'd recommend doing so sooner instead of later, because with no postmaster you aren't getting any checkpoints done, and your WAL space is going to start ballooning. As far as diagnosing the problem goes: if you have a postmaster log file, look to see if the postmaster wrote an ERROR or FATAL message before it exited. (Finding it among all the backend-level messages might be painful though.) Also look in the directory the postmaster was started in to see if there's a core file. Save away any evidence you can find before trying to start a new postmaster. Because the postmaster doesn't actually do much, crashes are pretty unusual. I'm interested in whatever you can find. regards, tom lane