From 7fc0e7de9fb8306e84d1c15211aba4308f694455 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Tue, 12 Apr 2022 14:45:23 -0400 Subject: Revert the addition of GetMaxBackends() and related stuff. This reverts commits 0147fc7, 4567596, aa64f23, and 5ecd018. 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 --- src/backend/access/nbtree/nbtutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/access/nbtree/nbtutils.c') diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c index 96c72fc4324..fd1b53885cc 100644 --- a/src/backend/access/nbtree/nbtutils.c +++ b/src/backend/access/nbtree/nbtutils.c @@ -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); -- cgit v1.2.3