Adjust postmaster to recognize that a lockfile containing its parent's PID
Tom Lane <tgl@sss.pgh.pa.us>
Adjust postmaster to recognize that a lockfile containing its parent's PID must be stale. Tweak example startup scripts to not use pg_ctl but launch the postmaster directly, thereby ensuring that only the postmaster's direct parent shell will be a postgres-owned process. In combination these should fix the longstanding problem of the postmaster sometimes refusing to start during reboot because it thinks the old lockfile is not stale.
Files
| Path | Change | +/− |
|---|---|---|
| contrib/start-scripts/freebsd | modified | +15 −8 |
| contrib/start-scripts/linux | modified | +17 −11 |
| contrib/start-scripts/PostgreSQL.darwin | modified | +16 −10 |
| src/backend/utils/init/miscinit.c | modified | +24 −8 |