From 898b3e6f6c7114f11dad47702aace5eddd5b749f Mon Sep 17 00:00:00 2001 From: Bruce Momjian <bruce@momjian.us> Date: Tue, 23 Jun 1998 17:59:54 +0000 Subject: [PATCH] Back out some changes I made just for testing. --- src/backend/storage/ipc/ipci.c | 5 +++-- src/backend/storage/lmgr/multi.c | 9 ++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/backend/storage/ipc/ipci.c b/src/backend/storage/ipc/ipci.c index 73d0edf8b3f..360788d85e4 100644 --- a/src/backend/storage/ipc/ipci.c +++ b/src/backend/storage/ipc/ipci.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.10 1998/06/23 17:52:28 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.11 1998/06/23 17:59:54 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -92,6 +92,7 @@ CreateSharedMemoryAndSemaphores(IPCKey key) * ---------------- */ InitLocks(); + InitMultiLevelLockm(); if (InitMultiLevelLockm() == INVALID_TABLEID) elog(FATAL, "Couldn't create the lock table"); @@ -145,7 +146,7 @@ AttachSharedMemoryAndSemaphores(IPCKey key) * ---------------- */ InitLocks(); - if (!MultiTableId && InitMultiLevelLockm() == INVALID_TABLEID) + if (InitMultiLevelLockm() == INVALID_TABLEID) elog(FATAL, "Couldn't attach to the lock table"); AttachSharedInvalidationState(key); diff --git a/src/backend/storage/lmgr/multi.c b/src/backend/storage/lmgr/multi.c index 19eafc06ce6..6c14bcd8958 100644 --- a/src/backend/storage/lmgr/multi.c +++ b/src/backend/storage/lmgr/multi.c @@ -12,7 +12,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.13 1998/06/23 17:52:28 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.14 1998/06/23 17:59:54 momjian Exp $ * * NOTES: * (1) The lock.c module assumes that the caller here is doing @@ -89,6 +89,13 @@ InitMultiLevelLockm() { int tableId; + /* ----------------------- + * If we're already initialized just return the table id. + * ----------------------- + */ + if (MultiTableId) + return MultiTableId; + tableId = LockTabInit("LockTable", MultiConflicts, MultiPrios, 5); MultiTableId = tableId; if (!(MultiTableId)) -- GitLab