Re: pg_receivewal and SIGTERM

Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>

From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Christoph Berg <myon@debian.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-08-16T11:50:05Z
Lists: pgsql-hackers
On Tue, Aug 16, 2022 at 5:15 PM Daniel Gustafsson <daniel@yesql.se> wrote:
>
> > On 16 Aug 2022, at 13:36, Christoph Berg <myon@debian.org> wrote:
>
> >>      pqsignal(SIGINT, sigint_handler);
> >> +    pqsignal(SIGTERM, sigint_handler);
> >> Tiny nitpick, I think we should rename sigint_handler to just sig_handler as it
> >> does handle more than sigint.
> >
> > I went with sigexit_handler since pg_recvlogical has also a
> > sighup_handler and "sig_handler" would be confusing there.
>
> Good point, sigexit_handler is a better name here.

+1.

Don't we need a similar explanation [1] for pg_recvlogical docs?

[1]
   <para>
    In the absence of fatal errors, <application>pg_receivewal</application>
-   will run until terminated by the <systemitem>SIGINT</systemitem> signal
-   (<keycombo action="simul"><keycap>Control</keycap><keycap>C</keycap></keycombo>).
+   will run until terminated by the <systemitem>SIGINT</systemitem>
+   (<keycombo action="simul"><keycap>Control</keycap><keycap>C</keycap></keycombo>)
+   or <systemitem>SIGTERM</systemitem> signal.

-- 
Bharath Rupireddy
RDS Open Source Databases: https://aws.amazon.com/rds/postgresql/



Commits

  1. Handle SIGTERM in pg_receivewal and pg_recvlogical

  2. doc: Add missing parenthesis to keycombo