Re: We shouldn't signal process groups with SIGQUIT

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: We shouldn't signal process groups with SIGQUIT
Date: 2023-03-02 00:59:44
Message-ID: Y//1AFoM1oOROBXU@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 01, 2023 at 03:34:30PM -0800, Andres Freund wrote:
> On 2023-02-28 13:45:41 +0900, Michael Paquier wrote:
>> From what I can see, SIGTERM is actually received by the backends
>> before SIGQUIT, and I can also see that the backends have enough room
>> to process CFIs in some cases, especially short queries, even before
>> reaching quickdie() and its exit(). So the window between SIGTERM and
>> SIGQUIT is not as long as one would think.
>
> What do you mean with the last ssentence? Why would one think that the window
> between them is long? Do you mean that it's not as short?

That should have been worded as "short". In what I looked at, both
signal handlers are processed in the same millisecond, still the
backend can have time to process a full CFI between the SIGTERM and
SIGQUIT handlers, before the SIGQUIT handler has the time to exit().
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-03-02 01:03:59 Re: add PROCESS_MAIN to VACUUM
Previous Message Michael Paquier 2023-03-02 00:56:21 Re: Allow +group in pg_ident.conf