Re: Problems Restarting PostgreSQL Daemon

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Problems Restarting PostgreSQL Daemon
Date: 2008-07-22 18:30:13
Message-ID: Pine.LNX.4.64.0807221125180.1929@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 22 Jul 2008, Tom Lane wrote:

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

Tom,

I thought the postmaster knew what was current and what needed to be
replaced, but the process ID in the pidfile did not exist.

> 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?

I deleted the .pid, but still could not get the postmaster running. Then I
'touched' the name so I had an empty file. Made no difference. While pg_ctl
tells me the server is starting, there is no /tmp/.s.PGSQL*, no pidfile, and
no postmaster process.

In the past I've managed to start the postmaster daemon manually, but
today I seem to have it FUBARed.

Rich

--
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Sturm 2008-07-22 18:30:55 Optimizing a like-cause
Previous Message Tom Lane 2008-07-22 18:22:43 Re: Initdb problem on debian mips cobalt: Bus error