diff options
Diffstat (limited to 'src/include/storage')
-rw-r--r-- | src/include/storage/lwlock.h | 3 | ||||
-rw-r--r-- | src/include/storage/pg_shmem.h | 5 | ||||
-rw-r--r-- | src/include/storage/proc.h | 12 | ||||
-rw-r--r-- | src/include/storage/shmem.h | 5 |
4 files changed, 15 insertions, 10 deletions
diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h index c318e60b577..ca384218a50 100644 --- a/src/include/storage/lwlock.h +++ b/src/include/storage/lwlock.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/lwlock.h,v 1.24 2005/12/11 21:02:18 tgl Exp $ + * $PostgreSQL: pgsql/src/include/storage/lwlock.h,v 1.25 2006/01/04 21:06:32 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -27,6 +27,7 @@ typedef enum LWLockId { BufMappingLock, BufFreelistLock, + ShmemIndexLock, OidGenLock, XidGenLock, ProcArrayLock, diff --git a/src/include/storage/pg_shmem.h b/src/include/storage/pg_shmem.h index 4dd91e8540f..59784117614 100644 --- a/src/include/storage/pg_shmem.h +++ b/src/include/storage/pg_shmem.h @@ -17,7 +17,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/pg_shmem.h,v 1.16 2005/10/15 02:49:46 momjian Exp $ + * $PostgreSQL: pgsql/src/include/storage/pg_shmem.h,v 1.17 2006/01/04 21:06:32 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -27,10 +27,11 @@ typedef struct PGShmemHeader /* standard header for all Postgres shmem */ { int32 magic; /* magic # to identify Postgres segments */ -#define PGShmemMagic 679834893 +#define PGShmemMagic 679834894 pid_t creatorPID; /* PID of creating process */ Size totalsize; /* total size of segment */ Size freeoffset; /* offset to first free space */ + Size indexoffset; /* offset to ShmemIndex table */ #ifndef WIN32 /* Windows doesn't have useful inode#s */ dev_t device; /* device data directory is on */ ino_t inode; /* inode number of data directory */ diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h index 2cfee41eff9..abf99668f34 100644 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/proc.h,v 1.85 2005/12/11 21:02:18 tgl Exp $ + * $PostgreSQL: pgsql/src/include/storage/proc.h,v 1.86 2006/01/04 21:06:32 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -114,9 +114,10 @@ typedef struct PROC_HDR int spins_per_delay; } PROC_HDR; - -#define DUMMY_PROC_DEFAULT 0 -#define DUMMY_PROC_BGWRITER 1 +/* + * We set aside some extra PGPROC structures for "dummy" processes, + * ie things that aren't full-fledged backends but need shmem access. + */ #define NUM_DUMMY_PROCS 2 @@ -134,7 +135,8 @@ extern int ProcGlobalSemas(void); extern Size ProcGlobalShmemSize(void); extern void InitProcGlobal(void); extern void InitProcess(void); -extern void InitDummyProcess(int proctype); +extern void InitProcessPhase2(void); +extern void InitDummyProcess(void); extern bool HaveNFreeProcs(int n); extern void ProcReleaseLocks(bool isCommit); diff --git a/src/include/storage/shmem.h b/src/include/storage/shmem.h index 520f8eb3adf..141ecf17d90 100644 --- a/src/include/storage/shmem.h +++ b/src/include/storage/shmem.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/shmem.h,v 1.45 2005/08/20 23:26:35 tgl Exp $ + * $PostgreSQL: pgsql/src/include/storage/shmem.h,v 1.46 2006/01/04 21:06:32 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -61,7 +61,8 @@ typedef struct SHM_QUEUE } SHM_QUEUE; /* shmem.c */ -extern void InitShmemAllocation(void *seghdr, bool init); +extern void InitShmemAccess(void *seghdr); +extern void InitShmemAllocation(void); extern void *ShmemAlloc(Size size); extern bool ShmemIsValid(unsigned long addr); extern void InitShmemIndex(void); |