aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/ipc/ipci.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/ipc/ipci.c')
-rw-r--r--src/backend/storage/ipc/ipci.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/backend/storage/ipc/ipci.c b/src/backend/storage/ipc/ipci.c
index 06988baf345..7dac93f3a03 100644
--- a/src/backend/storage/ipc/ipci.c
+++ b/src/backend/storage/ipc/ipci.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.42 2001/08/25 18:52:42 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.43 2001/09/29 04:02:23 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,6 +22,7 @@
#include "storage/bufmgr.h"
#include "storage/freespace.h"
#include "storage/lmgr.h"
+#include "storage/lwlock.h"
#include "storage/proc.h"
#include "storage/sinval.h"
#include "storage/spin.h"
@@ -53,7 +54,7 @@ CreateSharedMemoryAndSemaphores(bool makePrivate, int maxBackends)
size += LockShmemSize(maxBackends);
size += XLOGShmemSize();
size += CLOGShmemSize();
- size += SLockShmemSize();
+ size += LWLockShmemSize();
size += SInvalShmemSize(maxBackends);
size += FreeSpaceShmemSize();
#ifdef STABLE_MEMORY_STORAGE
@@ -74,14 +75,25 @@ CreateSharedMemoryAndSemaphores(bool makePrivate, int maxBackends)
/*
* First initialize spinlocks --- needed by InitShmemAllocation()
*/
- CreateSpinlocks(seghdr);
+ CreateSpinlocks();
/*
- * Set up shmem.c hashtable
+ * Set up shared memory allocation mechanism
*/
InitShmemAllocation(seghdr);
/*
+ * Now initialize LWLocks, which do shared memory allocation and
+ * are needed for InitShmemIndex.
+ */
+ CreateLWLocks();
+
+ /*
+ * Set up shmem.c index hashtable
+ */
+ InitShmemIndex();
+
+ /*
* Set up xlog, clog, and buffers
*/
XLOGShmemInit();