Re: [HACKERS] postmaster.pid - Mailing list pgsql-hackers

From Evan Simpson
Subject Re: [HACKERS] postmaster.pid
Date
Msg-id 384801D3.8FB691E6@4-am.com
Whole thread Raw
In response to postmaster.pid  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Responses Re: [HACKERS] postmaster.pid
List pgsql-hackers
Tatsuo Ishii wrote:

> I have committed changes to postmaster.c. Now it creates a file called
> "postmaster.pid" under $PGDATA, which holds postmaster's process
> id. If the file has already existed, postmaster won't start.

Do you just test to see if the file exists?  If so, I would suggest
actually reading the pid and checking to see if the process is still
running.  That way we don't have to 'rm postmaster.pid' if the postmaster
dies abnormally (Netscape for Linux has this problem).

Cheers,

Evan @ 4-am



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Re: [Fwd: postgresql-6.5.3. RPMs (Well Done!)]
Next
From: Vince Vielhaber
Date:
Subject: Re: [HACKERS] Re: [Fwd: postgresql-6.5.3. RPMs (Well Done!)]