Hi Christoph-- On Fri 2018-03-02 14:00:52 +0100, Christoph Berg wrote: > this is very interesting, especially Type=notify.
thanks for taking a look! > my first question would be if we could integrate the idea more tightly > with the existing postgresql@ services which are already capable of > launching clusters for different users (though currently hardcoded to > /etc/postgresql/*). The cluster machinery itself (pg_ctlcluster and > friends) can operate on different roots if PG_CLUSTER_CONF_ROOT is > set. Maybe that can be incorporated to work better together. i confess i don't understand the existing cluster machinery in debian as well as i understand the upstream binaries -- so my changes were focused specifically on setting up a simple per-user arrangement which: a) doesn't require any superuser interaction, and b) doesn't require us to think about any upgrade paths from previous versions ;) > One thing I have been thinking about was to replace pg_ctlcluster with > something more systemd-specific, including Type=notify operation. This > looks about what you have here. yep, Type=notify Just Works™ afaict with the currently-shipped postgres. it'd be great to have that used for the system stuff as well, but i haven't thought through the upgrade paths clearly yet. one additional fix to make things even nicer would be to make the cluster daemon fully socket-activated, but that's likely to be work for upstream, so we don't need to discuss it here. anyway, let me know if there are things i can do that would make you feel more comfortable adopting this user-specific cluster management idea. users can already do it, but it'd be nice to smooth out bumps in the road for them a little bit with a sensibly-maintained minimal interface for the simple use case. --dkg