mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +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:
@@ -559,14 +559,13 @@ pg_safe_snapshot_blocking_pids(PG_FUNCTION_ARGS)
|
||||
int *blockers;
|
||||
int num_blockers;
|
||||
Datum *blocker_datums;
|
||||
int max_backends = GetMaxBackends();
|
||||
|
||||
/* A buffer big enough for any possible blocker list without truncation */
|
||||
blockers = (int *) palloc(max_backends * sizeof(int));
|
||||
blockers = (int *) palloc(MaxBackends * sizeof(int));
|
||||
|
||||
/* Collect a snapshot of processes waited for by GetSafeSnapshot */
|
||||
num_blockers =
|
||||
GetSafeSnapshotBlockingPids(blocked_pid, blockers, max_backends);
|
||||
GetSafeSnapshotBlockingPids(blocked_pid, blockers, MaxBackends);
|
||||
|
||||
/* Convert int array to Datum array */
|
||||
if (num_blockers > 0)
|
||||
|
||||
Reference in New Issue
Block a user