aboutsummaryrefslogtreecommitdiff
path: root/src/include/miscadmin.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-05-28 05:13:32 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-05-28 05:13:32 +0000
commit1a321f26d88e5c64bccba9d36920aede1e201729 (patch)
tree43940a3ed5cc754bff68748502550731b0ad19a0 /src/include/miscadmin.h
parent37da0ba0e0f2d92857dc62789820d21e177dc00f (diff)
downloadpostgresql-1a321f26d88e5c64bccba9d36920aede1e201729.tar.gz
postgresql-1a321f26d88e5c64bccba9d36920aede1e201729.zip
Code review for EXEC_BACKEND changes. Reduce the number of #ifdefs by
about a third, make it work on non-Windows platforms again. (But perhaps I broke the WIN32 code, since I have no way to test that.) Fold all the paths that fork postmaster child processes to go through the single routine SubPostmasterMain, which takes care of resurrecting the state that would normally be inherited from the postmaster (including GUC variables). Clean up some places where there's no particularly good reason for the EXEC and non-EXEC cases to work differently. Take care of one or two FIXMEs that remained in the code.
Diffstat (limited to 'src/include/miscadmin.h')
-rw-r--r--src/include/miscadmin.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h
index 03491f2ee56..e8e35fd6b58 100644
--- a/src/include/miscadmin.h
+++ b/src/include/miscadmin.h
@@ -13,7 +13,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.160 2004/05/18 03:36:44 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.161 2004/05/28 05:13:24 tgl Exp $
*
* NOTES
* some of the information in this file should be moved to
@@ -116,13 +116,13 @@ do { \
* from postmaster/postmaster.c
*/
extern bool ClientAuthInProgress;
-extern const bool ExecBackend;
extern int PostmasterMain(int argc, char *argv[]);
+extern void ClosePostmasterPorts(bool pgstat_too);
#ifdef EXEC_BACKEND
-extern void SubPostmasterMain(int argc, char* argv[]);
+extern pid_t postmaster_forkexec(int argc, char *argv[]);
+extern int SubPostmasterMain(int argc, char *argv[]);
#endif
-extern void ClosePostmasterPorts(bool pgstat_too);
#define PG_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n"
@@ -143,8 +143,10 @@ extern long MyCancelKey;
extern char OutputFileName[];
extern char my_exec_path[];
-extern char postgres_exec_path[];
extern char pkglib_path[];
+#ifdef EXEC_BACKEND
+extern char postgres_exec_path[];
+#endif
/*
* done in storage/backendid.h for now.