summaryrefslogtreecommitdiff
path: root/src/include/storage/proc.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-01-04 21:06:32 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-01-04 21:06:32 +0000
commit349f40b2c264cbbfe4c5c7ba783bce58483cefae (patch)
tree426223e3fff88cd5f3c5e30bbdc1ad5ed64e59d5 /src/include/storage/proc.h
parente0078ea22ddb229e9050d17f8e3fa847f66f6768 (diff)
Rearrange backend startup sequence so that ShmemIndexLock can become
an LWLock instead of a spinlock. This hardly matters on Unix machines but should improve startup performance on Windows (or any port using EXEC_BACKEND). Per previous discussion.
Diffstat (limited to 'src/include/storage/proc.h')
-rw-r--r--src/include/storage/proc.h12
1 files changed, 7 insertions, 5 deletions
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);