Two options:
- Use pg_ctl.
- Implement/steal pg_kill (what pg_ctl uses for supporting windows.)
Part of the ultimate purpose of Cluster() is to provide a postgres daemon manager. Using pg_ctl tends to get in the
way of that: no access to the process result code, no access to any early failure messages on startup(?), and indirect
access to the PostgreSQL "ping" tool for waiting for startup.
Practical problems implementing pg_kill: What happens when core changes it?
Problems using pg_ctl: Difficulty providing quality interfaces(bad past experiences).
The way I see it:
pg_ctl = DBA tool.
postgresql.cluster.Cluster = Python Programmer's tool.
This distinction leads me to think that re-implementing pg_kill will be the right solution.
Two options:
Part of the ultimate purpose of Cluster() is to provide a postgres daemon manager. Using pg_ctl tends to get in the
way of that: no access to the process result code, no access to any early failure messages on startup(?), and indirect
access to the PostgreSQL "ping" tool for waiting for startup.
Practical problems implementing pg_kill: What happens when core changes it?
Problems using pg_ctl: Difficulty providing quality interfaces(bad past experiences).
The way I see it:
pg_ctl = DBA tool.
postgresql.cluster.Cluster = Python Programmer's tool.
This distinction leads me to think that re-implementing pg_kill will be the right solution.