Skip to content

Commit 4922173

Browse files
committed
worker_spi: Fix test failure with BGWORKER_BYPASS_ROLELOGINCHECK
This is a consequence of 4817da5 that has bumped up max_worker_processes, where now the last worker started by the test would be able to start by itself a parallel worker because there are more slots available. This did not show up before as the number of bgworkers reached exactly 8, as known as the previous limit, at the end of the test. Per report from buildfarm member crake, reproducible with debug_parallel_query = regress in the same fashion as fd4d93d.
1 parent 63a5822 commit 4922173

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/modules/worker_spi/worker_spi.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,11 @@ worker_spi_main(Datum main_arg)
174174
worker_spi_role, flags);
175175

176176
/*
177-
* Disable parallel query for workers started with BYPASS_ALLOWCONN so as
178-
* these don't attempt connections to the database that may not allow
179-
* that.
177+
* Disable parallel query for workers started with BYPASS_ALLOWCONN or
178+
* BGWORKER_BYPASS_ALLOWCONN so as these don't attempt connections using a
179+
* database or a role that may not allow that.
180180
*/
181-
if (flags & BGWORKER_BYPASS_ALLOWCONN)
181+
if ((flags & (BGWORKER_BYPASS_ALLOWCONN | BGWORKER_BYPASS_ROLELOGINCHECK)))
182182
SetConfigOption("max_parallel_workers_per_gather", "0",
183183
PGC_USERSET, PGC_S_OVERRIDE);
184184

0 commit comments

Comments
 (0)