mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Get rid of PID entries in shmem hash table; there is no longer any need
for them, and making them just wastes time during backend startup/shutdown. Also, remove compile-time MAXBACKENDS limit per long-ago proposal. You can now set MaxBackends as high as your kernel can stand without any reconfiguration/recompilation.
This commit is contained in:
@ -73,20 +73,10 @@ user_write_unlock_oid(Oid oid)
|
||||
}
|
||||
|
||||
int
|
||||
user_unlock_all()
|
||||
user_unlock_all(void)
|
||||
{
|
||||
PROC *proc;
|
||||
SHMEM_OFFSET location;
|
||||
|
||||
ShmemPIDLookup(MyProcPid, &location);
|
||||
if (location == INVALID_OFFSET)
|
||||
{
|
||||
elog(NOTICE, "UserUnlockAll: unable to get proc ptr");
|
||||
return -1;
|
||||
}
|
||||
|
||||
proc = (PROC *) MAKE_PTR(location);
|
||||
return LockReleaseAll(USER_LOCKMETHOD, proc, false, InvalidTransactionId);
|
||||
return LockReleaseAll(USER_LOCKMETHOD, MyProc, false,
|
||||
InvalidTransactionId);
|
||||
}
|
||||
|
||||
/* end of file */
|
||||
|
Reference in New Issue
Block a user