GUC assign hooks are supposed to be made whether doit is true or not.
static bool
assign_maxconnections(int newval, bool doit, GucSource source)
{
- if (doit)
- {
- if (newval + autovacuum_max_workers > INT_MAX / 4)
- return false;
+ if (newval + autovacuum_max_workers > INT_MAX / 4)
+ return false;
+ if (doit)
MaxBackends = newval + autovacuum_max_workers;
- }
return true;
}
static bool
assign_autovacuum_max_workers(int newval, bool doit, GucSource source)
{
- if (doit)
- {
- if (newval + MaxConnections > INT_MAX / 4)
- return false;
+ if (newval + MaxConnections > INT_MAX / 4)
+ return false;
+ if (doit)
MaxBackends = newval + MaxConnections;
- }
return true;
}