From 236b6bc29e532822a366b56404ecaf1d906229bf Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Wed, 15 Sep 2010 10:06:21 +0000 Subject: Simplify Windows implementation of latches. There's no need to keep a dynamic pool of event handles, we can permanently assign one for each shared latch. Thanks to that, we no longer need a separate shared memory block for latches, and we don't need to know in advance how many shared latches there is, so you no longer need to remember to update NumSharedLatches when you introduce a new latch to the system. --- src/backend/storage/ipc/ipci.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/backend/storage') diff --git a/src/backend/storage/ipc/ipci.c b/src/backend/storage/ipc/ipci.c index 881dae830c..666c015ded 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.105 2010/09/11 15:48:04 heikki Exp $ + * $PostgreSQL: pgsql/src/backend/storage/ipc/ipci.c,v 1.106 2010/09/15 10:06:21 heikki Exp $ * *------------------------------------------------------------------------- */ @@ -30,7 +30,6 @@ #include "replication/walsender.h" #include "storage/bufmgr.h" #include "storage/ipc.h" -#include "storage/latch.h" #include "storage/pg_shmem.h" #include "storage/pmsignal.h" #include "storage/procarray.h" @@ -118,7 +117,6 @@ CreateSharedMemoryAndSemaphores(bool makePrivate, int port) size = add_size(size, SInvalShmemSize()); size = add_size(size, PMSignalShmemSize()); size = add_size(size, ProcSignalShmemSize()); - size = add_size(size, LatchShmemSize()); size = add_size(size, BgWriterShmemSize()); size = add_size(size, AutoVacuumShmemSize()); size = add_size(size, WalSndShmemSize()); @@ -219,7 +217,6 @@ CreateSharedMemoryAndSemaphores(bool makePrivate, int port) */ PMSignalShmemInit(); ProcSignalShmemInit(); - LatchShmemInit(); BgWriterShmemInit(); AutoVacuumShmemInit(); WalSndShmemInit(); -- cgit v1.2.1