Hi Christoph,

On Wed, Jun 11, 2025 at 11:05:38AM +0200, Christoph Berg wrote:
> Would that mean that restarting one instance would trigger restarting
> the other instances on that machine?

Yes, indeed. [email protected] declares PartOf=postgresql.service such
that when restarting postgresql.service all instances are restarted.
Thanks for your attention to detail.

Obviously such a circular restart triggering is not what we want here.
So I guess we'd need two meta-units to implement what I am asking for.
Restarting postgresql.service should continue to restart all instances.

Say we were to add a postgresql-running.target and then have the
postgresql-generator also generate a drop-in for that target making it
[email protected] for each instance. Then other services
could Require=postgresql-running.target to be restarted when any
postgresql instance restarts.

That said, I'm not super convinced that this is a good solution. Maybe
spending more effort on the debci side is warranted. In principle, debci
should work with a remote postgresql server and then no such
notification can happen.

Helmut

Reply via email to