Re: pg_receivewal and SIGTERM

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Christoph Berg <myon(at)debian(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_receivewal and SIGTERM
Date: 2022-08-25 18:45:05
Message-ID: CABUevEzoK2yjK=OmjaXn7t3BW2z09_=DboegZLMh2qU0XW7ZDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 25, 2022 at 5:13 PM Christoph Berg <myon(at)debian(dot)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/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2022-08-25 19:03:27 Re: has_privs_of_role vs. is_member_of_role, redux
Previous Message Drouvot, Bertrand 2022-08-25 18:21:05 Re: SYSTEM_USER reserved word implementation