From: Charles Hornberger <charlie@hss.caltech.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: postmaster dead but backends still running?
Date: Thu, 19 Jun 2003 10:22:47 -0700 (PDT)
Message-ID: <Pine.LNX.4.53.0306191011140.3921@economex.caltech.edu> (raw)
In-Reply-To: <17715.1055893144@sss.pgh.pa.us>
References: <3EEF622C.4060908@hss.caltech.edu>
<3EEF7AE1.9070909@hss.caltech.edu>
<17715.1055893144@sss.pgh.pa.us>
On Tue, 17 Jun 2003, Tom Lane wrote:
> Charles Hornberger <charlie@hss.caltech.edu> 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...)
Unfortunately, our system administrator solved this before I got a chance
to test more. I don't know how he went about restarting the server,
although whatever he did doesn't appear to have hurt anything; would
it be interesting to know exactly what steps he took?
> > 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.
Interestingly, there are no messages in the log file, and I can't find a
core file -- in short, there's no evidence whatsoever, at least not that
I can find. (Though I am probably a pretty rotten detective.)
However, I think I know the cause (though I haven't tested to see if this
indeed causes the postmaster to die): A few hours before I noticed that
the postmaster was dead, one of the sysadmins made a typo that caused an
NFS mount to become unavailable -- the very NFS mount that held the
postgres executable (all our Solaris boxes share the same executables). So
the theory is that the postmaster tried to fork() a process using a
non-existent executable, and died as a result. Does this make any sense?
-Charlie
> Because the postmaster doesn't actually do much, crashes are pretty
> unusual. I'm interested in whatever you can find.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: charlie@hss.caltech.edu, tgl@sss.pgh.pa.us
Subject: Re: postmaster dead but backends still running?
In-Reply-To: <Pine.LNX.4.53.0306191011140.3921@economex.caltech.edu>
References: <3EEF622C.4060908@hss.caltech.edu> <3EEF7AE1.9070909@hss.caltech.edu> <17715.1055893144@sss.pgh.pa.us> <Pine.LNX.4.53.0306191011140.3921@economex.caltech.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox