mirror of
https://github.com/postgres/postgres.git
synced 2025-10-19 15:49:24 +03:00
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.
This commit is contained in:
@@ -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[]);
|
||||
#ifdef EXEC_BACKEND
|
||||
extern void SubPostmasterMain(int argc, char* argv[]);
|
||||
#endif
|
||||
extern void ClosePostmasterPorts(bool pgstat_too);
|
||||
#ifdef EXEC_BACKEND
|
||||
extern pid_t postmaster_forkexec(int argc, char *argv[]);
|
||||
extern int SubPostmasterMain(int argc, char *argv[]);
|
||||
#endif
|
||||
|
||||
#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.
|
||||
|
Reference in New Issue
Block a user