Re: postmaster dead but backends still running?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Charles Hornberger <charlie(at)hss(dot)caltech(dot)edu>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: postmaster dead but backends still running?
Date: 2003-06-17 23:39:04
Message-ID: 17715.1055893144@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Charles Hornberger <charlie(at)hss(dot)caltech(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message John McGloughlin 2003-06-18 04:02:54 configure readline error
Previous Message weigelt 2003-06-17 23:34:06 Re: [ADMIN] Can the frontend get notifications from the postgres server?