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

From Bruce Momjian
Subject Re: [HACKERS] postmaster.pid
Date
Msg-id 199912030730.CAA06648@candle.pha.pa.us
Whole thread Raw
In response to postmaster.pid  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Responses Re: [HACKERS] postmaster.pid
List pgsql-hackers
> Hi,
> 
> 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. So we
> cannot start more than on postmaster with same $PGDATA any more. I
> believe it's a good thing. The file will be deleted upon postmaster
> shutting down.

I assume you do a kill(0) on the pid if the file exists on startup to
check to see if the pid is still valid?

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: postmaster.pid
Next
From: Tatsuo Ishii
Date:
Subject: Re: [HACKERS] postmaster.pid