"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