From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Improve fix for not entering parallel mode when holding interrup |
Date: | 2024-11-08 18:42:18 |
Message-ID: | E1t9Tw1-000rN4-Jm@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Improve fix for not entering parallel mode when holding interrupts.
Commit ac04aa84a put the shutoff for this into the planner, which is
not ideal because it doesn't prevent us from re-using a previously
made parallel plan. Revert the planner change and instead put the
shutoff into InitializeParallelDSM, modeling it on the existing code
there for recovering from failure to allocate a DSM segment.
However, that code path is mostly untested, and testing a bit harder
showed there's at least one bug: ExecHashJoinReInitializeDSM is not
prepared for us to have skipped doing parallel DSM setup. I also
thought the Assert in ReinitializeParallelWorkers is pretty
ill-advised, and replaced it with a silent Min() operation.
The existing test case added by ac04aa84a serves fine to test this
version of the fix, so no change needed there.
Patch by me, but thanks to Noah Misch for the core idea that we
could shut off worker creation when !INTERRUPTS_CAN_BE_PROCESSED.
Back-patch to v12, as ac04aa84a was.
Discussion: https://postgr.es/m/CAC-SaSzHUKT=vZJ8MPxYdC_URPfax+yoA1hKTcF4ROz_Q6z0_Q@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b8df690492568d7852b799b4eff3274fbbd91e78
Modified Files
--------------
src/backend/access/transam/parallel.c | 19 ++++++++++++++++---
src/backend/executor/nodeHashjoin.c | 9 +++++++--
src/backend/optimizer/plan/planner.c | 6 ------
3 files changed, 23 insertions(+), 11 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-11-08 19:41:56 | Re: pgsql: Fix our Windows stat() emulation to handle file sizes > 4GB. |
Previous Message | Peter Geoghegan | 2024-11-08 18:10:43 | pgsql: Avoid nbtree parallel scan currPos confusion. |