mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Revert the addition of GetMaxBackends() and related stuff.
This reverts commits0147fc7
,4567596
,aa64f23
, and5ecd018
. There is no longer agreement that introducing this function was the right way to address the problem. The consensus now seems to favor trying to make a correct value for MaxBackends available to mdules executing their _PG_init() functions. Nathan Bossart Discussion: http://postgr.es/m/20220323045229.i23skfscdbvrsuxa@jrouhaud
This commit is contained in:
@ -2072,7 +2072,7 @@ BTreeShmemSize(void)
|
||||
Size size;
|
||||
|
||||
size = offsetof(BTVacInfo, vacuums);
|
||||
size = add_size(size, mul_size(GetMaxBackends(), sizeof(BTOneVacInfo)));
|
||||
size = add_size(size, mul_size(MaxBackends, sizeof(BTOneVacInfo)));
|
||||
return size;
|
||||
}
|
||||
|
||||
@ -2101,7 +2101,7 @@ BTreeShmemInit(void)
|
||||
btvacinfo->cycle_ctr = (BTCycleId) time(NULL);
|
||||
|
||||
btvacinfo->num_vacuums = 0;
|
||||
btvacinfo->max_vacuums = GetMaxBackends();
|
||||
btvacinfo->max_vacuums = MaxBackends;
|
||||
}
|
||||
else
|
||||
Assert(found);
|
||||
|
Reference in New Issue
Block a user