worker_spi: Fix test failure with BGWORKER_BYPASS_ROLELOGINCHECK
This is a consequence of4817da51f6
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 asfd4d93d269
.
This commit is contained in:
parent
63a582222c
commit
4922173010
|
@ -174,11 +174,11 @@ worker_spi_main(Datum main_arg)
|
|||
worker_spi_role, flags);
|
||||
|
||||
/*
|
||||
* Disable parallel query for workers started with BYPASS_ALLOWCONN so as
|
||||
* these don't attempt connections to the database that may not allow
|
||||
* that.
|
||||
* Disable parallel query for workers started with BYPASS_ALLOWCONN or
|
||||
* BGWORKER_BYPASS_ALLOWCONN so as these don't attempt connections using a
|
||||
* database or a role that may not allow that.
|
||||
*/
|
||||
if (flags & BGWORKER_BYPASS_ALLOWCONN)
|
||||
if ((flags & (BGWORKER_BYPASS_ALLOWCONN | BGWORKER_BYPASS_ROLELOGINCHECK)))
|
||||
SetConfigOption("max_parallel_workers_per_gather", "0",
|
||||
PGC_USERSET, PGC_S_OVERRIDE);
|
||||
|
||||
|
|
Loading…
Reference in New Issue