summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/pg_config.h.in8
-rw-r--r--src/include/storage/proc.h26
-rw-r--r--src/include/storage/shmem.h4
3 files changed, 20 insertions, 18 deletions
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in
index 30a3834261d..1cd0ba7e3c3 100644
--- a/src/include/pg_config.h.in
+++ b/src/include/pg_config.h.in
@@ -8,7 +8,7 @@
* or in pg_config.h afterwards. Of course, if you edit pg_config.h, then your
* changes will be overwritten the next time you run configure.
*
- * $Id: pg_config.h.in,v 1.3 2001/09/06 03:23:38 momjian Exp $
+ * $Id: pg_config.h.in,v 1.4 2001/09/07 00:27:29 tgl Exp $
*/
#ifndef PG_CONFIG_H
@@ -107,12 +107,6 @@
*/
/*
- * Hard limit on number of backend server processes per postmaster.
- * Increasing this costs about 32 bytes per process slot as of v 6.5.
- */
-#define MAXBACKENDS (DEF_MAXBACKENDS > 1024 ? DEF_MAXBACKENDS : 1024)
-
-/*
* Default number of buffers in shared buffer pool (each of size BLCKSZ).
* This is just the default setting for the postmaster's -B switch.
* Perhaps it ought to be configurable from a configure switch.
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h
index f35144e6919..0b318ec0a54 100644
--- a/src/include/storage/proc.h
+++ b/src/include/storage/proc.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: proc.h,v 1.45 2001/07/06 21:04:26 tgl Exp $
+ * $Id: proc.h,v 1.46 2001/09/07 00:27:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -104,10 +104,21 @@ do { \
* in each set for identification purposes.)
*
* PROC_SEM_MAP_ENTRIES is the number of semaphore sets we need to allocate
- * to keep track of up to MAXBACKENDS backends.
+ * to keep track of up to maxBackends backends.
*/
#define PROC_NSEMS_PER_SET 16
-#define PROC_SEM_MAP_ENTRIES ((MAXBACKENDS-1)/PROC_NSEMS_PER_SET+1)
+#define PROC_SEM_MAP_ENTRIES(maxBackends) (((maxBackends)-1)/PROC_NSEMS_PER_SET+1)
+
+typedef struct
+{
+ /* info about a single set of per-process semaphores */
+ IpcSemaphoreId procSemId;
+ int32 freeSemMap;
+ /*
+ * In freeSemMap, bit i is set if the i'th semaphore of this sema
+ * set is allocated to a process. (i counts from 0 at the LSB)
+ */
+} SEM_MAP_ENTRY;
typedef struct procglobal
{
@@ -115,13 +126,12 @@ typedef struct procglobal
SHMEM_OFFSET freeProcs;
/* Info about semaphore sets used for per-process semaphores */
- IpcSemaphoreId procSemIds[PROC_SEM_MAP_ENTRIES];
- int32 freeSemMap[PROC_SEM_MAP_ENTRIES];
-
+ int semMapEntries;
/*
- * In each freeSemMap entry, bit i is set if the i'th semaphore of the
- * set is allocated to a process. (i counts from 0 at the LSB)
+ * VARIABLE LENGTH ARRAY: actual length is semMapEntries.
+ * THIS MUST BE LAST IN THE STRUCT DECLARATION.
*/
+ SEM_MAP_ENTRY procSemMap[1];
} PROC_HDR;
/*
diff --git a/src/include/storage/shmem.h b/src/include/storage/shmem.h
index 2768a772d66..e01a0f01435 100644
--- a/src/include/storage/shmem.h
+++ b/src/include/storage/shmem.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: shmem.h,v 1.29 2001/06/18 21:38:02 momjian Exp $
+ * $Id: shmem.h,v 1.30 2001/09/07 00:27:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -71,8 +71,6 @@ extern void *ShmemAlloc(Size size);
extern bool ShmemIsValid(unsigned long addr);
extern HTAB *ShmemInitHash(char *name, long init_size, long max_size,
HASHCTL *infoP, int hash_flags);
-extern bool ShmemPIDLookup(int pid, SHMEM_OFFSET *locationPtr);
-extern SHMEM_OFFSET ShmemPIDDestroy(int pid);
extern void *ShmemInitStruct(char *name, Size size, bool *foundPtr);