postgresql/src
Tom Lane 06424e9a24 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
2024-11-08 13:42:01 -05:00
..
backend Improve fix for not entering parallel mode when holding interrupts. 2024-11-08 13:42:01 -05:00
bin psql: Fix \watch when using interval values less than 1ms 2024-10-14 12:28:01 +09:00
common Guard against enormously long input in pg_saslprep(). 2024-10-28 14:33:55 -04:00
fe_utils Prevent mis-encoding of "trailing junk after numeric literal" errors. 2024-09-05 12:42:33 -04:00
include Monkey-patch LLVM code to fix ARM relocation bug. 2024-11-06 23:09:03 +13:00
interfaces ecpg: Fix out-of-bound read in DecodeDateTime() 2024-10-23 08:35:02 +09:00
makefiles Use --strip-unneeded when stripping static libraries with GNU strip. 2023-04-20 18:12:32 -04:00
pl Further refine _SPI_execute_plan's rule for atomic execution. 2024-10-16 17:36:29 -04:00
port Fix overflow in bsearch_arg() with more than INT_MAX elements 2024-10-28 14:07:59 +02:00
template Use unnamed POSIX semaphores on Cygwin. 2023-01-06 10:33:28 +13:00
test Disallow partitionwise join when collations don't match 2024-11-08 17:19:13 +09:00
timezone Update time zone data files to tzdata release 2024b. 2024-10-29 11:49:56 -04:00
tools Monkey-patch LLVM code to fix ARM relocation bug. 2024-11-06 23:09:03 +13:00
tutorial Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
.gitignore
DEVELOPERS
Makefile Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
Makefile.global.in Suppress macOS warnings about duplicate libraries in link commands. 2023-09-29 14:07:30 -04:00
Makefile.shlib Stop using "-multiply_defined suppress" on macOS. 2023-09-26 21:06:21 -04:00
meson.build Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00