pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Charles Hornberger <charlie@hss.caltech.edu>
Cc: pgsql-admin@postgresql.org
Subject: Re: postmaster dead but backends still running?
Date: Tue, 17 Jun 2003 19:39:04 -0400
Message-ID: <17715.1055893144@sss.pgh.pa.us> (raw)
In-Reply-To: <3EEF7AE1.9070909@hss.caltech.edu>
References: <3EEF622C.4060908@hss.caltech.edu>
	<3EEF7AE1.9070909@hss.caltech.edu>

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...)

> 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



view thread (6+ messages)  latest in thread

Message-ID: <17715.1055893144@sss.pgh.pa.us>
Permalink:  ../17715.1055893144@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17715.1055893144@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, charlie@hss.caltech.edu
  Subject: Re: postmaster dead but backends still running?
  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>

* 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