mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Add an Assert() to max_parallel_workers enforcement.
To prevent future bugs along the lines of the one corrected by commit
8ff518699f
, or find any that remain
in the current code, add an Assert() that the difference between
parallel_register_count and parallel_terminate_count is in a sane
range.
Kuntal Ghosh, with considerable tidying-up by me, per a suggestion
from Neha Khatri. Reviewed by Tomas Vondra.
Discussion: http://postgr.es/m/CAFO0U+-E8yzchwVnvn5BeRDPgX2z9vZUxQ8dxx9c0XFGBC7N1Q@mail.gmail.com
This commit is contained in:
@ -57,7 +57,7 @@
|
||||
#include "parser/scansup.h"
|
||||
#include "pgstat.h"
|
||||
#include "postmaster/autovacuum.h"
|
||||
#include "postmaster/bgworker.h"
|
||||
#include "postmaster/bgworker_internals.h"
|
||||
#include "postmaster/bgwriter.h"
|
||||
#include "postmaster/postmaster.h"
|
||||
#include "postmaster/syslogger.h"
|
||||
@ -2713,7 +2713,7 @@ static struct config_int ConfigureNamesInt[] =
|
||||
NULL
|
||||
},
|
||||
&max_parallel_workers_per_gather,
|
||||
2, 0, 1024,
|
||||
2, 0, MAX_PARALLEL_WORKER_LIMIT,
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
@ -2723,7 +2723,7 @@ static struct config_int ConfigureNamesInt[] =
|
||||
NULL
|
||||
},
|
||||
&max_parallel_workers,
|
||||
8, 0, 1024,
|
||||
8, 0, MAX_PARALLEL_WORKER_LIMIT,
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user