Re: Problems Restarting PostgreSQL Daemon

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problems Restarting PostgreSQL Daemon
Date: 2008-07-22 17:42:41
Message-ID: 1029.1216748561@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rich Shepard <rshepard(at)appl-ecosys(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Glyn Astill 2008-07-22 18:09:02 Re: Initdb problem on debian mips cobalt: Bus error
Previous Message Bill Wordsworth 2008-07-22 17:40:23 Re: pg_query transaction: auto rollback? begin or start?? commit or end???