Re: pg_receivewal and SIGTERM

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Christoph Berg <myon(at)debian(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_receivewal and SIGTERM
Date: 2022-08-16 11:50:05
Message-ID: CALj2ACVTxZg_B5KTFbDYNKbP2=SXhxBWvopvK04eT0UvDsDckg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 16, 2022 at 5:15 PM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>
> > On 16 Aug 2022, at 13:36, Christoph Berg <myon(at)debian(dot)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/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message houzj.fnst@fujitsu.com 2022-08-16 11:57:17 RE: Support logical replication of DDLs
Previous Message Amit Kapila 2022-08-16 11:47:59 Re: Support logical replication of global object commands