aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-12-20 17:31:21 +0000
committerBruce Momjian <bruce@momjian.us>2003-12-20 17:31:21 +0000
commitd75b2ec4ebbc7fdb51088e89da47c6523bf2c640 (patch)
tree4f0a12508b01da4d98c663bbdadb4a2e1ae6837a /src/include
parent1ee0ddf91df31669ca0d07871d3f5aa88791b78d (diff)
downloadpostgresql-d75b2ec4ebbc7fdb51088e89da47c6523bf2c640.tar.gz
postgresql-d75b2ec4ebbc7fdb51088e89da47c6523bf2c640.zip
This patch is the next step towards (re)allowing fork/exec.
Claudio Natoli
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/xlogdefs.h9
-rw-r--r--src/include/c.h9
-rw-r--r--src/include/libpq/libpq-be.h8
-rw-r--r--src/include/storage/fd.h6
-rw-r--r--src/include/storage/ipc.h4
-rw-r--r--src/include/storage/lock.h4
-rw-r--r--src/include/storage/lwlock.h3
-rw-r--r--src/include/storage/shmem.h4
8 files changed, 35 insertions, 12 deletions
diff --git a/src/include/access/xlogdefs.h b/src/include/access/xlogdefs.h
index 023469c1cc6..057236e4eda 100644
--- a/src/include/access/xlogdefs.h
+++ b/src/include/access/xlogdefs.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/xlogdefs.h,v 1.10 2003/11/29 22:40:55 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/access/xlogdefs.h,v 1.11 2003/12/20 17:31:21 momjian Exp $
*/
#ifndef XLOG_DEFS_H
#define XLOG_DEFS_H
@@ -33,6 +33,13 @@ typedef struct XLogRecPtr
uint32 xrecoff; /* byte offset of location in log file */
} XLogRecPtr;
+typedef struct XLogwrtResult
+{
+ XLogRecPtr Write; /* last byte + 1 written out */
+ XLogRecPtr Flush; /* last byte + 1 flushed */
+} XLogwrtResult;
+
+
/*
* Macros for comparing XLogRecPtrs
*
diff --git a/src/include/c.h b/src/include/c.h
index f08f56633d0..984bf14fca5 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/c.h,v 1.157 2003/11/29 22:40:53 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/c.h,v 1.158 2003/12/20 17:31:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -793,6 +793,13 @@ extern int fdatasync(int fildes);
#define HAVE_STRTOULL 1
#endif
+/* EXEC_BACKEND defines */
+#ifdef EXEC_BACKEND
+#define NON_EXEC_STATIC
+#else
+#define NON_EXEC_STATIC static
+#endif
+
/* /port compatibility functions */
#include "port.h"
diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h
index a7dc475f570..f011afed86d 100644
--- a/src/include/libpq/libpq-be.h
+++ b/src/include/libpq/libpq-be.h
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/libpq/libpq-be.h,v 1.38 2003/11/29 22:41:03 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/libpq/libpq-be.h,v 1.39 2003/12/20 17:31:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,6 +27,11 @@
#endif
+typedef enum CAC_state
+{
+ CAC_OK, CAC_STARTUP, CAC_SHUTDOWN, CAC_RECOVERY, CAC_TOOMANY
+} CAC_state;
+
/*
* This is used by the postmaster in its communication with frontends. It
* contains all state information needed during this communication before the
@@ -42,6 +47,7 @@ typedef struct Port
ProtocolVersion proto; /* FE/BE protocol version */
SockAddr laddr; /* local addr (postmaster) */
SockAddr raddr; /* remote addr (client) */
+ CAC_state canAcceptConnections; /* postmaster connection status */
/*
* Information that needs to be saved from the startup packet and
diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h
index cb81f36a8a4..35a75a36719 100644
--- a/src/include/storage/fd.h
+++ b/src/include/storage/fd.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/fd.h,v 1.40 2003/11/29 22:41:13 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/storage/fd.h,v 1.41 2003/12/20 17:31:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -77,4 +77,8 @@ extern void RemovePgTempFiles(void);
extern int pg_fsync(int fd);
extern int pg_fdatasync(int fd);
+/* Filename components for OpenTemporaryFile */
+#define PG_TEMP_FILES_DIR "pgsql_tmp"
+#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
+
#endif /* FD_H */
diff --git a/src/include/storage/ipc.h b/src/include/storage/ipc.h
index fb59cd0200a..3c2765cc48c 100644
--- a/src/include/storage/ipc.h
+++ b/src/include/storage/ipc.h
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/ipc.h,v 1.63 2003/12/12 18:45:10 petere Exp $
+ * $PostgreSQL: pgsql/src/include/storage/ipc.h,v 1.64 2003/12/20 17:31:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -32,6 +32,8 @@ extern void on_exit_reset(void);
extern void CreateSharedMemoryAndSemaphores(bool makePrivate,
int maxBackends,
int port);
+#ifdef EXEC_BACKEND
extern void AttachSharedMemoryAndSemaphores(void);
+#endif
#endif /* IPC_H */
diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h
index a7d66b835eb..2d13e9df114 100644
--- a/src/include/storage/lock.h
+++ b/src/include/storage/lock.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/lock.h,v 1.75 2003/12/01 21:59:25 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/storage/lock.h,v 1.76 2003/12/20 17:31:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -86,8 +86,6 @@ typedef uint16 LOCKMETHODID;
*/
typedef struct LockMethodData
{
- HTAB *lockHash;
- HTAB *proclockHash;
LOCKMETHODID lockmethodid;
int numLockModes;
LOCKMASK conflictTab[MAX_LOCKMODES];
diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h
index db5b3d49bb4..34f9c6613c7 100644
--- a/src/include/storage/lwlock.h
+++ b/src/include/storage/lwlock.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/lwlock.h,v 1.9 2003/11/29 22:41:13 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/storage/lwlock.h,v 1.10 2003/12/20 17:31:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -29,7 +29,6 @@ typedef enum LWLockId
LockMgrLock,
OidGenLock,
XidGenLock,
- ShmemIndexLock,
SInvalLock,
FreeSpaceLock,
MMCacheLock,
diff --git a/src/include/storage/shmem.h b/src/include/storage/shmem.h
index a818f65fe9a..648cdf8c3a4 100644
--- a/src/include/storage/shmem.h
+++ b/src/include/storage/shmem.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/shmem.h,v 1.40 2003/11/29 22:41:13 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/storage/shmem.h,v 1.41 2003/12/20 17:31:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -61,7 +61,7 @@ typedef struct SHM_QUEUE
} SHM_QUEUE;
/* shmem.c */
-extern void InitShmemAllocation(void *seghdr);
+extern void InitShmemAllocation(void *seghdr, bool init);
extern void *ShmemAlloc(Size size);
extern bool ShmemIsValid(unsigned long addr);
extern void InitShmemIndex(void);