dalibo / pgtoolkit

Postgres Support from Python
https://pgtoolkit.rtfd.io/
PostgreSQL License
21 stars 9 forks source link

Pg controldata #87

Closed pgiraud closed 3 years ago

dlax commented 3 years ago

I'm not sure we should have a new module for this. More specifically, it might make sense to provide a controldata method on PGCtl.

This way, users will only need to build a single object bound to a given postgresql bindir and usage of "normal" pg_ctl commands through PGCtl methods will be consistent with the would-be controldata method.

Maybe PGCtl name is misleading and too close to pg_ctl, but the idea was really to expose a single entry point for all binaries in /usr/lib/postgresql/<version>/bin.

pgiraud commented 3 years ago

I got biased because all the functions in the PGCtl modules run commands with pg_ctl. The only exception was the call of pg_config used in __init__. I agree with you that it makes things a bit more simple to put everything in one single module.