[Pkg-postgresql-public] Bug#843893: Optionally refuse non-root pg_ctlcluster operation to enforce proper systemd usage

Christoph Berg christoph.berg at credativ.de
Thu Nov 10 13:45:32 UTC 2016


Package: postgresql-common
Version: 177
Severity: wishlist

10 14:37 <magnush> Myon: thoughts on having a config switch to turn "Warning: the cluster will not be running as a systemd service. Consider using systemctl:\n" into a hard error instead?
10 14:38 <Berge> I've wondered if it can just invoke systemctl if it's being run as root.
10 14:39 <Myon> Berge: it does, it only warns if postgres invokes pg_ctlcluster
10 14:39 <Berge> ah, nice
10 14:39 <Myon> magnush: I think that would freak out everyone trying to start postgres as "postgres"
10 14:39 <Myon> it does refuse to restart a systemd cluster as postgres
10 14:40 <Myon> magnush: imho the only viable fix would be to allow postgres to properly start/stop services, and that doesn't seem feasible atm
10 14:40 <Berge> What's a systemd cluster?
10 14:40 <magnush> Myon: i'm not saying it should do so by default. I'm saing I'd like a way to in an installation make sure that people don't accidentally stat it as postgres
10 14:40 <magnush> because the nit's not a systemd unit
10 14:40 <magnush> which means the system can loose sync between them and not figure out when it's running at all.
10 14:40 <Myon> Berge: I mean a PostgreSQL instance running properly from systemd
10 14:40 <Berge> Myon: ah, right
10 14:40 <Myon> magnush: nod
10 14:40 <magnush> So I want to,m for this specific installation, *force* people to start/stop using systemd. SOP still tells them to always do that, but I want to enfforce it.
10 14:42 <Myon> I generally agree, but that leads to even more warts on an already a-tad-too-complicated system
10 14:42 <magnush> Myon: a simple setting somewhere in /etc/postgresql-common wouldn't be all that difficult would it? And I could easily provision it out with the customer puppet setup :P
10 14:44 <Myon> I think the proper place would be (the per-cluster) pg_ctl.conf, and on top of that, a gobal pg_ctl.conf to provide the defaults

Christoph



More information about the Pkg-postgresql-public mailing list