From 011c3e62e78b02a573f6f59ce78b1e7515d380c0 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 19 Apr 2004 23:27:17 +0000 Subject: Code review for ARC patch. Eliminate static variables, improve handling of VACUUM cases so that VACUUM requests don't affect the ARC state at all, avoid corner case where BufferSync would uselessly rewrite a buffer that no longer contains the page that was to be flushed. Make some minor other cleanups in and around the bufmgr as well, such as moving PinBuffer and UnpinBuffer into bufmgr.c where they really belong. --- src/backend/storage/ipc/ipci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/backend/storage/ipc/ipci.c') diff --git a/src/backend/storage/ipc/ipci.c b/src/backend/storage/ipc/ipci.c index ac738d8f77..3e8c2a6c1b 100644 --- a/src/backend/storage/ipc/ipci.c +++ b/src/backend/storage/ipc/ipci.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/ipc/ipci.c,v 1.65 2004/02/25 19:41:22 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/storage/ipc/ipci.c,v 1.66 2004/04/19 23:27:17 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -60,7 +60,8 @@ CreateSharedMemoryAndSemaphores(bool makePrivate, * moderately-accurate estimates for the big hogs, plus 100K for the * stuff that's too small to bother with estimating. */ - size = BufferShmemSize(); + size = hash_estimate_size(SHMEM_INDEX_SIZE, sizeof(ShmemIndexEnt)); + size += BufferShmemSize(); size += LockShmemSize(maxBackends); size += XLOGShmemSize(); size += CLOGShmemSize(); -- cgit v1.2.1