Re: Postmaster self-deadlock due to PLT linkage resolution
Noah Misch <noah@leadboat.com>
From: Noah Misch <noah@leadboat.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2022-08-30T02:42:01Z
Lists: 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.
Commits
-
Use WaitEventSet API for postmaster's event loop.
- 7389aad63666 16.0 cited
-
On NetBSD, force dynamic symbol resolution at postmaster start.
- 5bed28e699ec 10.23 landed
- 6fd58ca7703a 11.18 landed
- 68bfe36c5173 12.13 landed
- a94b019d44e5 13.9 landed
- 464db46760d2 14.6 landed
- 529d8f3736a1 15.0 landed
- 8acd8f8690ed 16.0 landed