public inbox for pgsql-docs@postgresql.org
help / color / mirror / Atom feedFrom: Andrew Jackson <andrewjackson947@gmail.com>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-docs@postgresql.org
Subject: Re: Add Restart=on-failure To Example Systemd File
Date: Tue, 3 Mar 2026 08:56:46 -0600
Message-ID: <CAKK5BkHh4AWTD0KMqF+fA=vqwAe4_cCG59q+wLstz=YwwYAeAQ@mail.gmail.com> (raw)
In-Reply-To: <61063be9-abbc-4253-ac8e-2762c9997a24@eisentraut.org>
References: <CAKK5BkFfMpAQnv8CLs=i=rZwurtCV_gmfRb0uZi-V+d6wcryqg@mail.gmail.com>
<61063be9-abbc-4253-ac8e-2762c9997a24@eisentraut.org>
Awesome, thank you.
With regard to downstream package managers:
I previously raised an issue with pgdg yum repos which was actioned [0].
The only other package manager that I use is nixpkgs, interestingly they
set their service file's restart policy to "always"[1].
[0]: https://github.com/pgdg-packaging/pgdg-rpms/issues/127
[1]:
https://github.com/NixOS/nixpkgs/blob/e510dca493787fb7dff8ad31c1f215a0e4d7800a/nixos/modules/service...
On Tue, Mar 3, 2026, 6:22 AM Peter Eisentraut <peter@eisentraut.org> wrote:
> 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.
>
>
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: andrewjackson947@gmail.com, peter@eisentraut.org
Subject: Re: Add Restart=on-failure To Example Systemd File
In-Reply-To: <CAKK5BkHh4AWTD0KMqF+fA=vqwAe4_cCG59q+wLstz=YwwYAeAQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox