mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Add max_parallel_workers GUC.
Increase the default value of the existing max_worker_processes GUC from 8 to 16, and add a new max_parallel_workers GUC with a maximum of 8. This way, even if the maximum amount of parallel query is happening, there is still room for background workers that do other things, as originally envisioned when max_worker_processes was added. Julien Rouhaud, reviewed by Amit Kapila and by revised by me.
This commit is contained in:
@ -454,7 +454,8 @@ LaunchParallelWorkers(ParallelContext *pcxt)
|
||||
snprintf(worker.bgw_name, BGW_MAXLEN, "parallel worker for PID %d",
|
||||
MyProcPid);
|
||||
worker.bgw_flags =
|
||||
BGWORKER_SHMEM_ACCESS | BGWORKER_BACKEND_DATABASE_CONNECTION;
|
||||
BGWORKER_SHMEM_ACCESS | BGWORKER_BACKEND_DATABASE_CONNECTION
|
||||
| BGWORKER_CLASS_PARALLEL;
|
||||
worker.bgw_start_time = BgWorkerStart_ConsistentState;
|
||||
worker.bgw_restart_time = BGW_NEVER_RESTART;
|
||||
worker.bgw_main = ParallelWorkerMain;
|
||||
|
Reference in New Issue
Block a user