Re: pg_receivewal and SIGTERM - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: pg_receivewal and SIGTERM
Date
Msg-id YwLRCurycn/qRX3I@paquier.xyz
Whole thread Raw
In response to Re: pg_receivewal and SIGTERM  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: pg_receivewal and SIGTERM
List pgsql-hackers
On Fri, Aug 19, 2022 at 05:34:56PM +0530, Bharath Rupireddy wrote:
> +1 to add "some" info in the docs (I'm not sure about the better
> wording though), we can try to be more specific of the use case if
> required.

Yes, the amount of extra docs provided by the patch proposed by
Christoph looks fine by me.

FWIW, grouping the signal handlers into a common area like
streamutil.c seems rather confusing to me, as they set different
variable names that rely on their own assumptions in their local file,
so I would leave that out, like the patch.

While looking at the last patch proposed, it strikes me that
time_to_stop should be sig_atomic_t in pg_receivewal.c, as the safe
type of variable to set in a signal handler.  We could change that,
while on it..

Backpatching this stuff is not an issue here.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: Supporting TAP tests with MSVC and Windows
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: shared-memory based stats collector - v70