Re: Possible better pg_ctl start/stop handling?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Possible better pg_ctl start/stop handling?
Date: 2005-07-11 17:50:14
Message-ID: 10662.1121104214@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> FATAL: pre-existing shared memory block (key 5432001, ID 19202077) is
> still in use
> HINT: If you're sure there are no old server processes still running,
> remove the shared memory block with the command "ipcclean", "ipcrm", or
> just delete the file "postmaster.pid".

> As we can see pg_ctl knows that the PID does not exist. If the PID does
> not exist is it safe to assume that we can remove the file? So that we
> may start again?

The error message is warning you that there appear to still be live
backends in the data directory, even though the original postmaster
process is gone (crashed?). If that is the case, forcibly starting a
new postmaster is a fine recipe for creating unrecoverable data
corruption. So having pg_ctl auto-remove the file is horribly dangerous
and is NOT going to happen.

How did you get into this state anyway?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2005-07-11 18:06:03 Re: Hide source code
Previous Message David Fetter 2005-07-11 17:11:34 Re: Hide source code