Re: Use of signal-unsafe functions from signal handlers

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, Mats Kindahl <mats(at)timescale(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Use of signal-unsafe functions from signal handlers
Date: 2022-05-25 00:45:31
Message-ID: Yo18KyPNP0G03n10@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, May 24, 2022 at 10:15:55AM -0400, Tom Lane wrote:
> ereport() itself is just the tip of the iceberg; even if it's safe
> (which I concur it isn't), there's also the atexit/on_proc_exit
> functions that are likely to be called during shutdown. So yeah,
> this coding is not too safe. I'm not sure that getting rid of it
> would be a net win though, as we'd replace it-might-crash hazards
> with it-might-never-exit hazards, from bgworkers that neglect to
> respond to ShutdownRequestPending.

Hmm. Shouldn't we worry about FloatExceptionHandler() that gets used
on SIGFPE?
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2022-05-25 00:51:42 Re: BUG #17495: Regression in 15beta1 when filtering subquery including row_number window function
Previous Message Michael Paquier 2022-05-25 00:37:23 Re: BUG #17492: error MSB4126: The specified solution configuration "Release|arm64" is invalid