pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: Mats Kindahl <mats@timescale.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Use of signal-unsafe functions from signal handlers
Date: Wed, 25 May 2022 09:45:31 +0900
Message-ID: <Yo18KyPNP0G03n10@paquier.xyz> (raw)
In-Reply-To: <1531973.1653401755@sss.pgh.pa.us>
References: <CA+14425wJh3m2XA4c8-stRKGQYLwKqFiScqZm7BBt1JxU2iU-g@mail.gmail.com>
	<20220524101418.7pp65powa362vzln@jrouhaud>
	<CA+14426Zpdi6=jr9Z+C_tzS36pVa_+BbCHSeriqd=sLw4X6_iw@mail.gmail.com>
	<20220524123739.6glyxyx4owqpqjnr@jrouhaud>
	<1531973.1653401755@sss.pgh.pa.us>

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

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (8+ messages)  latest in thread

Message-ID: <Yo18KyPNP0G03n10@paquier.xyz>
Permalink:  ../Yo18KyPNP0G03n10@paquier.xyz/
Also on:    postgresql.org/message-id/Yo18KyPNP0G03n10@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, tgl@sss.pgh.pa.us, rjuju123@gmail.com, mats@timescale.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: Use of signal-unsafe functions from signal handlers
  In-Reply-To: <Yo18KyPNP0G03n10@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox