Re: pg_receivewal and SIGTERM
Magnus Hagander <magnus@hagander.net>
From: Magnus Hagander <magnus@hagander.net>
To: Christoph Berg <myon@debian.org>, Michael Paquier <michael@paquier.xyz>, Daniel Gustafsson <daniel@yesql.se>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-08-25T18:45:05Z
Lists: 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/
Commits
-
Handle SIGTERM in pg_receivewal and pg_recvlogical
- 8b60db774356 16.0 landed
-
doc: Add missing parenthesis to keycombo
- 6cbed0ec791f 16.0 landed
- 207fc7546644 15.0 landed