"Dorward Villaruz" <dorwardv@ntsp.nec.co.jp> writes:
> we have an application that needs to restart postgres if it crashes. �
Why do you think you need that?
Postmaster crashes (as opposed to crashes of individual backends) are so
rare in my experience that it's not worth worrying about; I'd certainly
not think that an external application having control over the
postmaster would be a net improvement in reliability.
I have seen some sites where the postmaster is spawned as a child of
init, so that if it does happen to die, init will automatically start
a new one. Might be worth doing if you're paranoid.
regards, tom lane