First, try to start postgres using pgctl.  If that succeeds, we're responsible for stopping it later; if that fails, just try to connect because there is probably already one running.  If that succeeds, we're not responsible for stopping postgres; if it fails, give up.
First, try to start postgres using pgctl.  If that succeeds, we're responsible for stopping it later; if that fails, just try to connect because there is probably already one running.  If that succeeds, we're not responsible for stopping postgres; if it fails, give up.


git-svn-id: 0c33e958600270102f91bf5868e396345dde476c@11816 e27351fd-9f3e-4f54-a53b-843176b1656c

red-hood/calendarserver,red-hood/calendarserver,red-hood/calendarserver,red-hood/calendarserver,red-hood/calendarserver,red-hood/calendarserver