Skip to content

Commit 86fdb32

Browse files
committed
Remove freeBackends counter from the sinval shared memory area. We used to
use it to help enforce superuser_reserved_backends, but since 8.1 it's just been dead weight.
1 parent b163baa commit 86fdb32

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/backend/storage/ipc/sinvaladt.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.69 2008/03/18 12:36:43 alvherre Exp $
11+
* $PostgreSQL: pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.70 2008/06/17 20:07:08 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -82,7 +82,6 @@ typedef struct SISeg
8282
int maxMsgNum; /* next message number to be assigned */
8383
int lastBackend; /* index of last active procState entry, +1 */
8484
int maxBackends; /* size of procState array */
85-
int freeBackends; /* number of empty procState slots */
8685

8786
/*
8887
* Next LocalTransactionId to use for each idle backend slot. We keep
@@ -157,7 +156,6 @@ CreateSharedInvalidationState(void)
157156
shmInvalBuffer->maxMsgNum = 0;
158157
shmInvalBuffer->lastBackend = 0;
159158
shmInvalBuffer->maxBackends = MaxBackends;
160-
shmInvalBuffer->freeBackends = MaxBackends;
161159

162160
/* The buffer[] array is initially all unused, so we need not fill it */
163161

@@ -223,9 +221,6 @@ SharedInvalBackendInit(void)
223221
/* Advertise assigned backend ID in MyProc */
224222
MyProc->backendId = MyBackendId;
225223

226-
/* Reduce free slot count */
227-
segP->freeBackends--;
228-
229224
/* Fetch next local transaction ID into local memory */
230225
nextLocalTransactionId = segP->nextLXID[MyBackendId - 1];
231226

@@ -273,9 +268,6 @@ CleanupInvalidationState(int status, Datum arg)
273268
}
274269
segP->lastBackend = i;
275270

276-
/* Adjust free slot count */
277-
segP->freeBackends++;
278-
279271
LWLockRelease(SInvalLock);
280272
}
281273

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy