Re: Add Restart=on-failure To Example Systemd File - Mailing list pgsql-docs

From Peter Eisentraut
Subject Re: Add Restart=on-failure To Example Systemd File
Date
Msg-id 61063be9-abbc-4253-ac8e-2762c9997a24@eisentraut.org
Whole thread Raw
In response to Add Restart=on-failure To Example Systemd File  (Andrew Jackson <andrewjackson947@gmail.com>)
Responses Re: Add Restart=on-failure To Example Systemd File
List pgsql-docs
On 27.11.25 19:55, Andrew Jackson wrote:
> Currently the systemd file in the documentation does not specify a
> restart policy. By default systemd will not attempt to restart a
> service that has failed (killed by OOM-killer for example) [0]. The
> systemd docs recommends "Setting this to on-failure is the recommended
> choice for long-running services, in order to increase reliability by
> attempting automatic recovery from errors." I think that Postgres is
> probably a good example of a "long-running service". Pgbouncer for
> example also uses "Restart=on-failure" [1].

Committed.

I think your argument from the commit message that most users copy their 
systemd unit files from the docs is not quite correct.  Most users use 
what is in packages.  So perhaps you want to check the usual packagings 
and see if they are also using that setting.




pgsql-docs by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Documentation incorrect pg_partition_root function description.
Next
From: Andrew Jackson
Date:
Subject: Re: Add Restart=on-failure To Example Systemd File