Re: pg_receivewal and SIGTERM - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: pg_receivewal and SIGTERM
Date
Msg-id CABUevEzoK2yjK=OmjaXn7t3BW2z09_=DboegZLMh2qU0XW7ZDQ@mail.gmail.com
Whole thread Raw
In response to Re: pg_receivewal and SIGTERM  (Christoph Berg <myon@debian.org>)
Responses Re: pg_receivewal and SIGTERM
List pgsql-hackers
On Thu, Aug 25, 2022 at 5:13 PM Christoph Berg <myon@debian.org> wrote:
>
> Re: Michael Paquier
> > FWIW, I've worked on an archiver integration a few years ago and got
> > annoyed that we use SIGINT while SIGTERM was the default (systemd was
> > not directly used there but the signal problem was the same, so we had
> > to go through some loops to make the stop signal configurable, like
> > systemd).
>
> SIGTERM is really the default for any init system or run-a-daemon system.

It is, but there is also precedent for not using it for graceful
shutdown. Apache, for example, will do what we do today on SIGTERM and
you use SIGWINCH to make it shut down gracefully (which would be the
equivalent of us flushing the compression buffers, I'd say).

I'm not saying we shouldn't change -- I fully approve of making the
change. But the world is full of fairly prominent examples of the
other way as well.

I'm leaning towards considering it a feature-change and thus not
something to backpatch (I'd be OK sneaking it into 15 though, as that
one is not released yet and it feels like a perfectly *safe* change).
Not enough to insist on it, but it seems "slightly more correct".

-- 
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/



pgsql-hackers by date:

Previous
From: "Drouvot, Bertrand"
Date:
Subject: Re: SYSTEM_USER reserved word implementation
Next
From: Joe Conway
Date:
Subject: Re: has_privs_of_role vs. is_member_of_role, redux