Re: postgres under linux can't start because of postmaster.pid - Mailing list pgsql-hackers

From Richard Wang
Subject Re: postgres under linux can't start because of postmaster.pid
Date
Msg-id ffp8oi$1f6e$1@news.hub.org
Whole thread Raw
In response to postgres under linux can't start because of postmaster.pid  ("Richard Wang" <ruc_wang@hotmail.com>)
Responses Re: postgres under linux can't start because of postmaster.pid
List pgsql-hackers
I just consider this may happens and pg can't recover correctly:
if postgres crashed last time and left a postmaster.pid file, and last 
postgres
id is reused by another process which is not postgres now.


"Tom Lane" <tgl@sss.pgh.pa.us> д����Ϣ����:29598.1193228404@sss.pgh.pa.us...
> "Richard Wang" <ruc_wang@hotmail.com> writes:
>> I construct a postmaster.pid file and then set the pid to be one of 
>> existing
>> process id(not postgres, e.g vim), then I run postgres. This may happen 
>> if
>> postgres crashed last time and left a postmaster.pid file, and last 
>> postgres
>> id is reused by another process which is not postgres now.
>
> Don't do that.  The postmaster is perfectly capable of recovering on
> its own, why would you want to mess with the postmaster.pid file?
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
>                http://www.postgresql.org/about/donate
> 




pgsql-hackers by date:

Previous
From: "Dharmendra Goyal"
Date:
Subject: order by in cursor declaration does not allow update
Next
From: Dave Page
Date:
Subject: Re: pgadmin debug on windows