diff options
| author | Tom Lane | 1999-02-21 01:41:55 +0000 |
|---|---|---|
| committer | Tom Lane | 1999-02-21 01:41:55 +0000 |
| commit | 9d197856dd5eda5cf85b15e564ae09ef8fef0e9e (patch) | |
| tree | ac85492fb01823aeb836e54f5e5511366346f418 /src/backend/storage/ipc/ipci.c | |
| parent | 75cccd0ad3184e3fa283f407c765520d3c774c86 (diff) | |
Rearrange handling of MAXBACKENDS a little bit. The default setting
of MAXBACKENDS is now 1024, since all it's costing is about 32 bytes of memory
per array slot. configure's --with-maxbackends switch now controls DEF_MAXBACKENDS
which is simply the default value of the postmaster's -N switch. Thus,
the out-of-the-box configuration will still limit you to 64 backends,
but you can go up to 1024 backends simply by restarting the postmaster with
a different -N switch --- no rebuild required.
Diffstat (limited to 'src/backend/storage/ipc/ipci.c')
| -rw-r--r-- | src/backend/storage/ipc/ipci.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/backend/storage/ipc/ipci.c b/src/backend/storage/ipc/ipci.c index 460f0ee10bb..49259807b40 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.20 1999/02/19 07:10:47 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.21 1999/02/21 01:41:44 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -72,7 +72,7 @@ CreateSharedMemoryAndSemaphores(IPCKey key, int maxBackends) * ---------------- */ CreateSpinlocks(IPCKeyGetSpinLockSemaphoreKey(key)); - size = BufferShmemSize() + LockShmemSize(); + size = BufferShmemSize() + LockShmemSize(maxBackends); #ifdef STABLE_MEMORY_STORAGE size += MMShmemSize(); @@ -113,15 +113,13 @@ CreateSharedMemoryAndSemaphores(IPCKey key, int maxBackends) void AttachSharedMemoryAndSemaphores(IPCKey key) { - int size; - /* ---------------- * create rather than attach if using private key * ---------------- */ if (key == PrivateIPCKey) { - CreateSharedMemoryAndSemaphores(key, 1); + CreateSharedMemoryAndSemaphores(key, 16); return; } @@ -136,8 +134,7 @@ AttachSharedMemoryAndSemaphores(IPCKey key) * attach the buffer manager buffer pool (and semaphore) * ---------------- */ - size = BufferShmemSize() + LockShmemSize(); - InitShmem(key, size); + InitShmem(key, 0); InitBufferPool(key); /* ---------------- |
