Re: pid gets overwritten in OSX

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Francois Suter <dba(at)paragraf(dot)ch>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pid gets overwritten in OSX
Date: 2002-04-26 14:46:24
Message-ID: 26046.1019832384@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Francois Suter <dba(at)paragraf(dot)ch> writes:
> the following scenario: Postgres starts after quite a few other
> processes, tries to start with the pid stored in the postmaster.pid
> file and actually doesn't start because the pid is already in use.

Postgres does not "try to start with the stored pid"; that's entirely
impossible under any flavor of Unix. You get the PID the kernel assigns
you, and that's that. This could well be a problem of failure to start
up, but you're barking up the wrong tree as to why.

What is needed at this point is more observation. You need to determine
whether the postmaster is in fact starting (and later dying) or
failing to start at all --- ie, is the postmaster.pid file left over
from a previous system boot cycle? Checking the mod date of the pid
file might be enough to tell.

> Is there an error log somewhere where such an error might appear?

What are you doing with the postmaster's stderr? If your start script
for the postmaster is routing it to /dev/null, send it someplace more
helpful.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Riebs, Andy 2002-04-26 14:50:09 Re: intel vs amd benchmark for pg server
Previous Message Steve Wampler 2002-04-26 14:29:04 Re: intel vs amd benchmark for pg server

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-04-26 14:46:27 Re: Vote totals for SET in aborted transaction
Previous Message Tom Lane 2002-04-26 14:41:02 Re: WAL -> Replication