Re: Leader backend hang on IPC/ParallelFinish when LWLock held at parallel query start
Francesco Degrassi <francesco.degrassi@optionfactory.net>
From: Francesco Degrassi <francesco.degrassi@optionfactory.net>
To: Noah Misch <noah@leadboat.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Peter Geoghegan <pg@bowt.ie>,
pgsql-bugs@lists.postgresql.org
Date: 2024-09-19T06:52:09Z
Lists: pgsql-bugs
On Thu, 19 Sept 2024 at 04:53, Noah Misch <noah@leadboat.com> wrote: > For what it's worth, I tried making standard_ExecutorStart() warn if > !INTERRUPTS_CAN_BE_PROCESSED(). Only this thread's new test and > 004_verify_nbtree_unique reached the warning. (That's not a surprise.) The reproducer I provided is actually a minimization of 004_verify_nbtree_unique, so it's just the one case actually. > On Wed, Sep 18, 2024 at 08:59:22AM -0400, Peter Geoghegan wrote: > > The test case provided was intended to be illustrative of a problem > > that some foreign data wrapper ran into, when it used SPI. > > Ideally, we'd block those or at least warn under assertions so FDW authors > don't accidentally run the executor with an LWLock held. Unlike the opclass > case, we so far don't have a valid use case for holding an LWLock there. In > other words, if the opclass use case is the only known-valid one, it would be > nice to have checks so new use cases don't creep in. My 2c as a FDW developer, having a warning when calling into the SPI with a LWLock held would have allowed us to identify this issue months ago, well before we stumbled into a parallel plan and hang. Best regards -- Francesco
Commits
-
Improve fix for not entering parallel mode when holding interrupts.
- b8df69049256 18.0 landed
- bcbdb176e1e2 15.9 landed
- 989ccd26c838 14.14 landed
- 943b65358e88 17.1 landed
- 6e39ca6e7edb 12.21 landed
- 62685876f7b5 13.17 landed
- 06424e9a24f0 16.5 landed
-
Don't enter parallel mode when holding interrupts.
- 916b8ae475fa 13.17 landed
- 884860bfc028 15.9 landed
- 5c698e8987db 14.14 landed
- 507b72bd9f7d 12.21 landed
- 6f6521de9a96 16.5 landed
- 2370582ab14f 17.0 landed
- ac04aa84a7f0 18.0 landed
-
Add has_largeobject_privilege function.
- 4eada203a5a8 18.0 cited