> Best practice for this sort of thing is considered to be to run the two
> Postgres instances under different user IDs. That avoids them thinking
> that the other one's lock files are relevant, and it provides an extra
> layer of security against possible conflicts between the two instances.
>
> regards, tom lane
Thanks, an interesting notice. I already did changes in start script to check instance by pg_ctl status and delete
lockfile if status<>0. But your recommendation is looked better.