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/transam/twophase.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/backend/access/transam/twophase.c') diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c index 7632596008c..dc0266693e3 100644 --- a/src/backend/access/transam/twophase.c +++ b/src/backend/access/transam/twophase.c @@ -264,7 +264,6 @@ TwoPhaseShmemInit(void) { GlobalTransaction gxacts; int i; - int max_backends = GetMaxBackends(); Assert(!found); TwoPhaseState->freeGXacts = NULL; @@ -298,7 +297,7 @@ TwoPhaseShmemInit(void) * prepared transaction. Currently multixact.c uses that * technique. */ - gxacts[i].dummyBackendId = max_backends + 1 + i; + gxacts[i].dummyBackendId = MaxBackends + 1 + i; } } else -- cgit v1.2.3