Re: Problems Restarting PostgreSQL Daemon - Mailing list pgsql-general

From Tom Lane
Subject Re: Problems Restarting PostgreSQL Daemon
Date
Msg-id 1029.1216748561@sss.pgh.pa.us
Whole thread Raw
In response to Re: Problems Restarting PostgreSQL Daemon  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: Problems Restarting PostgreSQL Daemon
List pgsql-general
Rich Shepard <rshepard@appl-ecosys.com> writes:
>    I tried following the logic, and it appears the issue now is 'invalid data
> in PID file "/var/lib/pgsql/data/postmaster.pid" '. If I delete that file,
> is it automatically recreated? I'm using /usr/bin/pg_ctl as user postgres.

If you're certain there's no postmaster running, it's safe to remove
postmaster.pid.  However you really shouldn't have to; the postmaster
is generally able to figure out whether a pidfile is live or not.

The "invalid data" bit is interesting though.  It looks like pg_ctl
would produce that error if the pidfile exists but is empty when it
looks.  This seems like a race condition hazard, though the odds of
hitting it are tiny.  What's in the file exactly?

            regards, tom lane

pgsql-general by date:

Previous
From: Glyn Astill
Date:
Subject: Re: Initdb problem on debian mips cobalt: Bus error
Next
From: Tom Lane
Date:
Subject: Re: Initdb problem on debian mips cobalt: Bus error