Re: Postmaster self-deadlock due to PLT linkage resolution - Mailing list pgsql-hackers

From Noah Misch
Subject Re: Postmaster self-deadlock due to PLT linkage resolution
Date
Msg-id 20220830024201.GA932727@rfd.leadboat.com
Whole thread Raw
In response to Postmaster self-deadlock due to PLT linkage resolution  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Aug 29, 2022 at 03:43:55PM -0400, Tom Lane wrote:
> I'd originally intended to make this code "#ifdef __NetBSD__",
> but on looking into the FreeBSD sources I find much the same locking
> logic in their dynamic loader, and now I'm wondering if such behavior
> isn't pretty standard.

I doubt it's standard.  POSIX specifies select() to be async-signal-safe.
This NetBSD bug makes select() not be async-signal-safe.

> The added calls should have negligible cost,
> so it doesn't seem unreasonable to do them everywhere.

Agreed.  I would make the comment mention the NetBSD version that prompted
this, so we have a better chance of removing the workaround in a few decades.



pgsql-hackers by date:

Previous
From: Zheng Li
Date:
Subject: Re: Support logical replication of global object commands
Next
From: David Rowley
Date:
Subject: Re: Reducing the chunk header sizes on all memory context types