Index: doc/src/sgml/runtime.sgml =================================================================== RCS file: /cvsroot/pgsql-server/doc/src/sgml/runtime.sgml,v retrieving revision 1.268 diff -c -c -r1.268 runtime.sgml *** doc/src/sgml/runtime.sgml 27 Jun 2004 22:58:19 -0000 1.268 --- doc/src/sgml/runtime.sgml 11 Jul 2004 00:06:48 -0000 *************** *** 563,568 **** --- 563,616 ---- any desired selection condition. + + Configuration Files + + + + + pgdata (string) + + + Specifies the directory to use for data storage (everything except + configuration files). + + + + + + hba_conf (string) + + + Specifies the file name to use for configuration of host-based + authentication (HBA). + + + + + + ident_conf (string) + + + Specifies the file name to use for configuration of + ident authentication. + + + + + + external_pidfile (string) + + + Specifies the location of an additional postmaster + process-id (PID) file for use by server administration programs. + + + + + + + Connections and Authentication Index: doc/src/sgml/ref/postmaster.sgml =================================================================== RCS file: /cvsroot/pgsql-server/doc/src/sgml/ref/postmaster.sgml,v retrieving revision 1.50 diff -c -c -r1.50 postmaster.sgml *** doc/src/sgml/ref/postmaster.sgml 21 Jun 2004 04:06:04 -0000 1.50 --- doc/src/sgml/ref/postmaster.sgml 11 Jul 2004 00:06:49 -0000 *************** *** 67,80 **** One postmaster always manages the data from exactly one database cluster. A database cluster is a collection of databases that is stored at a common file system ! location. When the postmaster starts it needs to know the location ! of the database cluster files (data area). This is ! done with the invocation option or the ! PGDATA environment variable; there is no default. ! More than one postmaster process can run on a system at one time, ! as long as they use different data areas and different communication ports (see below). A data area is created with . --- 67,93 ---- One postmaster always manages the data from exactly one database cluster. A database cluster is a collection of databases that is stored at a common file system ! location. When the postmaster starts it needs ! to know the location of the database cluster files (data ! area). ! More than one postmaster process can run on a system ! at one time as long as they use different data areas and different communication ports (see below). A data area is created with . + + + + The data area is specified by the option + or the PGDATA environment variable; there is no default. + Typically, it points to a directory created by + initdb. However, for administrative flexibility, you can + point to a directory containing only configuration files: + postgresql.conf, pg_hba.conf, and + pg_ident.conf. You can then set + postgresql.conf's pgdata to point to the + data directory. You can also point just to the server configuration file + like postgresql.conf and set its variables to point to the + other configuration files and the data directory. Index: src/backend/bootstrap/bootstrap.c =================================================================== RCS file: /cvsroot/pgsql-server/src/backend/bootstrap/bootstrap.c,v retrieving revision 1.185 diff -c -c -r1.185 bootstrap.c *** src/backend/bootstrap/bootstrap.c 24 Jun 2004 21:02:24 -0000 1.185 --- src/backend/bootstrap/bootstrap.c 11 Jul 2004 00:06:50 -0000 *************** *** 212,218 **** char *dbname; int flag; int xlogop = BS_XLOG_NOP; ! char *potential_DataDir = NULL; /* * initialize globals --- 212,218 ---- char *dbname; int flag; int xlogop = BS_XLOG_NOP; ! char *userPGDATA = NULL; /* * initialize globals *************** *** 236,243 **** if (!IsUnderPostmaster) { InitializeGUCOptions(); ! potential_DataDir = getenv("PGDATA"); /* Null if no PGDATA ! * variable */ } /* Ignore the initial -boot argument, if present */ --- 236,242 ---- if (!IsUnderPostmaster) { InitializeGUCOptions(); ! userPGDATA = getenv("PGDATA"); /* Null if no PGDATA variable */ } /* Ignore the initial -boot argument, if present */ *************** *** 252,258 **** switch (flag) { case 'D': ! potential_DataDir = optarg; break; case 'd': { --- 251,257 ---- switch (flag) { case 'D': ! userPGDATA = optarg; break; case 'd': { *************** *** 326,332 **** if (!IsUnderPostmaster) { ! if (!potential_DataDir) { write_stderr("%s does not know where to find the database system data.\n" "You must specify the directory that contains the database system\n" --- 325,331 ---- if (!IsUnderPostmaster) { ! if (!userPGDATA) { write_stderr("%s does not know where to find the database system data.\n" "You must specify the directory that contains the database system\n" *************** *** 335,341 **** argv[0]); proc_exit(1); } ! SetDataDir(potential_DataDir); } /* Validate we have been given a reasonable-looking DataDir */ --- 334,340 ---- argv[0]); proc_exit(1); } ! SetDataDir(userPGDATA); } /* Validate we have been given a reasonable-looking DataDir */ Index: src/backend/libpq/hba.c =================================================================== RCS file: /cvsroot/pgsql-server/src/backend/libpq/hba.c,v retrieving revision 1.125 diff -c -c -r1.125 hba.c *** src/backend/libpq/hba.c 30 May 2004 23:40:26 -0000 1.125 --- src/backend/libpq/hba.c 11 Jul 2004 00:06:52 -0000 *************** *** 35,40 **** --- 35,41 ---- #include "miscadmin.h" #include "nodes/pg_list.h" #include "storage/fd.h" + #include "utils/guc.h" /* Max size of username ident server can return */ *************** *** 1029,1045 **** void load_hba(void) { - int bufsize; FILE *file; /* The config file we have to read */ char *conf_file; /* The name of the config file */ if (hba_lines || hba_line_nums) free_lines(&hba_lines, &hba_line_nums); ! /* Put together the full pathname to the config file. */ ! bufsize = (strlen(DataDir) + strlen(CONF_FILE) + 2) * sizeof(char); ! conf_file = (char *) palloc(bufsize); ! snprintf(conf_file, bufsize, "%s/%s", DataDir, CONF_FILE); file = AllocateFile(conf_file, "r"); if (file == NULL) --- 1030,1051 ---- void load_hba(void) { FILE *file; /* The config file we have to read */ char *conf_file; /* The name of the config file */ if (hba_lines || hba_line_nums) free_lines(&hba_lines, &hba_line_nums); ! /* HBA filename in config file */ ! if (guc_hbafile) ! conf_file = pstrdup(guc_hbafile); ! else ! { ! char *confloc = (user_pgconfig_is_dir) ? user_pgconfig : DataDir; ! /* put together the full pathname to the config file */ ! conf_file = palloc(strlen(confloc) + strlen(CONF_FILE) + 2); ! sprintf(conf_file, "%s/%s", confloc, CONF_FILE); ! } file = AllocateFile(conf_file, "r"); if (file == NULL) *************** *** 1178,1193 **** FILE *file; /* The map file we have to read */ char *map_file; /* The name of the map file we have to * read */ - int bufsize; - if (ident_lines || ident_line_nums) free_lines(&ident_lines, &ident_line_nums); ! /* put together the full pathname to the map file */ ! bufsize = (strlen(DataDir) + strlen(USERMAP_FILE) + 2) * sizeof(char); ! map_file = (char *) palloc(bufsize); ! snprintf(map_file, bufsize, "%s/%s", DataDir, USERMAP_FILE); ! file = AllocateFile(map_file, "r"); if (file == NULL) { --- 1184,1203 ---- FILE *file; /* The map file we have to read */ char *map_file; /* The name of the map file we have to * read */ if (ident_lines || ident_line_nums) free_lines(&ident_lines, &ident_line_nums); ! /* IDENT filename in config file */ ! if (guc_identfile) ! map_file = pstrdup(guc_identfile); ! else ! { ! /* put together the full pathname to the map file */ ! char *confloc = (user_pgconfig_is_dir) ? user_pgconfig : DataDir; ! map_file = (char *) palloc(strlen(confloc) + strlen(USERMAP_FILE) + 2); ! sprintf(map_file, "%s/%s", confloc, USERMAP_FILE); ! } ! file = AllocateFile(map_file, "r"); if (file == NULL) { Index: src/backend/postmaster/postmaster.c =================================================================== RCS file: /cvsroot/pgsql-server/src/backend/postmaster/postmaster.c,v retrieving revision 1.405 diff -c -c -r1.405 postmaster.c *** src/backend/postmaster/postmaster.c 24 Jun 2004 21:02:55 -0000 1.405 --- src/backend/postmaster/postmaster.c 11 Jul 2004 00:06:57 -0000 *************** *** 233,238 **** --- 233,239 ---- * postmaster.c - function prototypes */ static void checkDataDir(const char *checkdir); + static bool onlyConfigSpecified(const char *checkdir); #ifdef USE_RENDEZVOUS static void reg_reply(DNSServiceRegistrationReplyErrorType errorCode, void *context); *************** *** 306,312 **** { int opt; int status; ! char *potential_DataDir = NULL; int i; progname = get_progname(argv[0]); --- 307,313 ---- { int opt; int status; ! char *userPGDATA = NULL; int i; progname = get_progname(argv[0]); *************** *** 370,376 **** */ InitializeGUCOptions(); ! potential_DataDir = getenv("PGDATA"); /* default value */ opterr = 1; --- 371,377 ---- */ InitializeGUCOptions(); ! userPGDATA = getenv("PGDATA"); /* default value */ opterr = 1; *************** *** 395,401 **** /* Can no longer set the backend executable file to use. */ break; case 'D': ! potential_DataDir = optarg; break; case 'd': { --- 396,402 ---- /* Can no longer set the backend executable file to use. */ break; case 'D': ! userPGDATA = optarg; break; case 'd': { *************** *** 523,535 **** ExitPostmaster(1); } ! /* ! * Now we can set the data directory, and then read postgresql.conf. ! */ ! checkDataDir(potential_DataDir); /* issues error messages */ ! SetDataDir(potential_DataDir); ! ProcessConfigFile(PGC_POSTMASTER); /* If timezone is not set, determine what the OS uses */ pg_timezone_initialize(); --- 524,572 ---- ExitPostmaster(1); } ! if (onlyConfigSpecified(userPGDATA)) ! { ! /* ! * It is either a file name or a directory with no ! * global/pg_control file, and hence not a data directory. ! */ ! user_pgconfig = userPGDATA; ! ProcessConfigFile(PGC_POSTMASTER); ! ! if (!guc_pgdata) /* Got a pgdata from the config file? */ ! { ! write_stderr("%s does not know where to find the database system data.\n" ! "This should be specified as 'pgdata' in %s%s.\n", ! progname, userPGDATA, ! user_pgconfig_is_dir ? "/postgresql.conf" : ""); ! ExitPostmaster(2); ! } ! checkDataDir(guc_pgdata); ! SetDataDir(guc_pgdata); ! } ! else ! { ! /* Now we can set the data directory, and then read postgresql.conf. */ ! checkDataDir(userPGDATA); ! SetDataDir(userPGDATA); ! ProcessConfigFile(PGC_POSTMASTER); ! } ! if (external_pidfile) ! { ! FILE *fpidfile = fopen(external_pidfile, "w"); ! ! if (fpidfile) ! { ! fprintf(fpidfile, "%d\n", MyProcPid); ! fclose(fpidfile); ! /* Should we remove the pid file on postmaster exit? */ ! } ! else ! fprintf(stderr, ! gettext("%s could not write to external pid file %s\n"), ! progname, external_pidfile); ! } /* If timezone is not set, determine what the OS uses */ pg_timezone_initialize(); *************** *** 847,852 **** --- 884,915 ---- } + + static bool + onlyConfigSpecified(const char *checkdir) + { + char path[MAXPGPATH]; + struct stat stat_buf; + + if (checkdir == NULL) /* checkDataDir handles this */ + return FALSE; + + if (stat(checkdir, &stat_buf) == -1) /* ditto */ + return FALSE; + + if (S_ISREG(stat_buf.st_mode)) /* It's a regular file, so assume it's explict */ + return TRUE; + else if (S_ISDIR(stat_buf.st_mode)) /* It's a directory, is it a config or system dir? */ + { + snprintf(path, MAXPGPATH, "%s/global/pg_control", checkdir); + /* If this is not found, it is a config-only directory */ + if (stat(path, &stat_buf) == -1) + return TRUE; + } + return FALSE; + } + + /* * Validate the proposed data directory */ *************** *** 861,868 **** { write_stderr("%s does not know where to find the database system data.\n" "You must specify the directory that contains the database system\n" ! "either by specifying the -D invocation option or by setting the\n" ! "PGDATA environment variable.\n", progname); ExitPostmaster(2); } --- 924,931 ---- { write_stderr("%s does not know where to find the database system data.\n" "You must specify the directory that contains the database system\n" ! "or configuration files by either specifying the -D invocation option\n" ! "or by setting the PGDATA environment variable.\n", progname); ExitPostmaster(2); } *************** *** 872,883 **** if (errno == ENOENT) ereport(FATAL, (errcode_for_file_access(), ! errmsg("data directory \"%s\" does not exist", checkdir))); else ereport(FATAL, (errcode_for_file_access(), ! errmsg("could not read permissions of directory \"%s\": %m", checkdir))); } --- 935,946 ---- if (errno == ENOENT) ereport(FATAL, (errcode_for_file_access(), ! errmsg("data or configuration location \"%s\" does not exist", checkdir))); else ereport(FATAL, (errcode_for_file_access(), ! errmsg("could not read permissions of \"%s\": %m", checkdir))); } Index: src/backend/tcop/postgres.c =================================================================== RCS file: /cvsroot/pgsql-server/src/backend/tcop/postgres.c,v retrieving revision 1.422 diff -c -c -r1.422 postgres.c *** src/backend/tcop/postgres.c 1 Jul 2004 00:51:11 -0000 1.422 --- src/backend/tcop/postgres.c 11 Jul 2004 00:07:04 -0000 *************** *** 2164,2170 **** { int flag; const char *dbname = NULL; ! char *potential_DataDir = NULL; bool secure; int errs = 0; int debug_flag = 0; --- 2164,2170 ---- { int flag; const char *dbname = NULL; ! char *userPGDATA = NULL; bool secure; int errs = 0; int debug_flag = 0; *************** *** 2235,2241 **** if (!IsUnderPostmaster) { InitializeGUCOptions(); ! potential_DataDir = getenv("PGDATA"); } /* ---------------- --- 2235,2241 ---- if (!IsUnderPostmaster) { InitializeGUCOptions(); ! userPGDATA = getenv("PGDATA"); } /* ---------------- *************** *** 2283,2289 **** case 'D': /* PGDATA directory */ if (secure) ! potential_DataDir = optarg; break; case 'd': /* debug level */ --- 2283,2289 ---- case 'D': /* PGDATA directory */ if (secure) ! userPGDATA = optarg; break; case 'd': /* debug level */ *************** *** 2574,2585 **** * set up handler to log session end. */ if (IsUnderPostmaster && Log_disconnections) ! on_proc_exit(log_disconnections,0); } if (!IsUnderPostmaster) { ! if (!potential_DataDir) { write_stderr("%s does not know where to find the database system data.\n" "You must specify the directory that contains the database system\n" --- 2574,2585 ---- * set up handler to log session end. */ if (IsUnderPostmaster && Log_disconnections) ! on_proc_exit(log_disconnections, 0); } if (!IsUnderPostmaster) { ! if (!userPGDATA) { write_stderr("%s does not know where to find the database system data.\n" "You must specify the directory that contains the database system\n" *************** *** 2588,2594 **** argv[0]); proc_exit(1); } ! SetDataDir(potential_DataDir); } Assert(DataDir); --- 2588,2594 ---- argv[0]); proc_exit(1); } ! SetDataDir(userPGDATA); } Assert(DataDir); Index: src/backend/utils/misc/guc-file.l =================================================================== RCS file: /cvsroot/pgsql-server/src/backend/utils/misc/guc-file.l,v retrieving revision 1.22 diff -c -c -r1.22 guc-file.l *** src/backend/utils/misc/guc-file.l 26 May 2004 15:07:38 -0000 1.22 --- src/backend/utils/misc/guc-file.l 11 Jul 2004 00:07:05 -0000 *************** *** 129,171 **** * function does not return if an error occurs. If an error occurs, no * values will be changed. */ ! void ! ProcessConfigFile(GucContext context) { int token, parse_state; char *opt_name, *opt_value; - char *filename; struct name_value_pair *item, *head, *tail; int elevel; FILE * fp; - Assert(context == PGC_POSTMASTER || context == PGC_BACKEND - || context == PGC_SIGHUP); - Assert(DataDir); elevel = (context == PGC_SIGHUP) ? DEBUG4 : ERROR; - /* - * Open file - */ - filename = malloc(strlen(DataDir) + strlen(CONFIG_FILENAME) + 2); - if (filename == NULL) - { - ereport(elevel, - (errcode(ERRCODE_OUT_OF_MEMORY), - errmsg("out of memory"))); - return; - } - sprintf(filename, "%s/" CONFIG_FILENAME, DataDir); - fp = AllocateFile(filename, "r"); if (!fp) { free(filename); ! /* File not found is fine */ ! if (errno != ENOENT) ! ereport(elevel, ! (errcode_for_file_access(), ! errmsg("could not open configuration file \"%s\": %m", CONFIG_FILENAME))); return; } --- 129,152 ---- * function does not return if an error occurs. If an error occurs, no * values will be changed. */ ! static void ! ReadConfigFile(char *filename, GucContext context) { int token, parse_state; char *opt_name, *opt_value; struct name_value_pair *item, *head, *tail; int elevel; FILE * fp; elevel = (context == PGC_SIGHUP) ? DEBUG4 : ERROR; fp = AllocateFile(filename, "r"); if (!fp) { free(filename); ! ereport(elevel, ! (errcode_for_file_access(), ! errmsg("could not open configuration file \"%s\": %m", filename))); return; } *************** *** 197,203 **** token = yylex(); if (token != GUC_ID && token != GUC_STRING && ! token != GUC_INTEGER && token != GUC_REAL && token != GUC_UNQUOTED_STRING) goto parse_error; opt_value = strdup(yytext); --- 178,185 ---- token = yylex(); if (token != GUC_ID && token != GUC_STRING && ! token != GUC_INTEGER && ! token != GUC_REAL && token != GUC_UNQUOTED_STRING) goto parse_error; opt_value = strdup(yytext); *************** *** 259,265 **** } FreeFile(fp); - free(filename); /* * Check if all options are valid --- 241,246 ---- *************** *** 282,293 **** parse_error: FreeFile(fp); - free(filename); free_name_value_list(head); ereport(elevel, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("syntax error in file \"%s\" line %u, near token \"%s\"", ! CONFIG_FILENAME, ConfigFileLineno, yytext))); return; out_of_memory: --- 263,273 ---- parse_error: FreeFile(fp); free_name_value_list(head); ereport(elevel, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("syntax error in file \"%s\" line %u, near token \"%s\"", ! filename, ConfigFileLineno, yytext))); return; out_of_memory: *************** *** 298,303 **** --- 278,342 ---- (errcode(ERRCODE_OUT_OF_MEMORY), errmsg("out of memory"))); return; + } + + /* + * Function to read and process the configuration file. The + * parameter indicates the context that the file is being read + * (postmaster startup, backend startup, or SIGHUP). All options + * mentioned in the configuration file are set to new values. This + * function does not return if an error occurs. If an error occurs, no + * values will be changed. + */ + void + ProcessConfigFile(GucContext context) + { + char *filename; + + Assert(context == PGC_POSTMASTER || context == PGC_BACKEND || context == PGC_SIGHUP); + + /* Added for explicit config file */ + if (user_pgconfig) + { + struct stat sb; + + if (stat(user_pgconfig, &sb) != 0) + { + int elevel = (context == PGC_SIGHUP) ? DEBUG3 : ERROR; + elog(elevel, "Configuration file \"%s\" does not exist", user_pgconfig); + return; + } + + if (S_ISDIR(sb.st_mode)) + { + /* This will cause a small one time memory leak + * if the user also specifies hba_conf, + * ident_conf, and data_dir + */ + filename = malloc(strlen(user_pgconfig) + strlen(CONFIG_FILENAME) + 2); + sprintf(filename, "%s/%s", user_pgconfig, CONFIG_FILENAME); + user_pgconfig_is_dir = true; + } + else + filename = strdup(user_pgconfig); /* Use explicit file */ + } + else + { + /* Use datadir for config */ + filename = malloc(strlen(DataDir) + strlen(CONFIG_FILENAME) + 2); + sprintf(filename, "%s/%s", DataDir, CONFIG_FILENAME); + } + + if (filename == NULL) + { + int elevel = (context == PGC_SIGHUP) ? DEBUG3 : ERROR; + elog(elevel, "out of memory"); + return; + } + + ReadConfigFile(filename, context); + + free(filename); } Index: src/backend/utils/misc/guc.c =================================================================== RCS file: /cvsroot/pgsql-server/src/backend/utils/misc/guc.c,v retrieving revision 1.213 diff -c -c -r1.213 guc.c *** src/backend/utils/misc/guc.c 5 Jul 2004 23:14:14 -0000 1.213 --- src/backend/utils/misc/guc.c 11 Jul 2004 00:07:08 -0000 *************** *** 57,62 **** --- 57,69 ---- #include "utils/pg_locale.h" #include "pgstat.h" + char *guc_pgdata; + char *guc_hbafile; + char *guc_identfile; + char *external_pidfile; + + char *user_pgconfig = NULL; + bool user_pgconfig_is_dir = false; #ifndef PG_KRB_SRVTAB #define PG_KRB_SRVTAB "" *************** *** 107,112 **** --- 114,120 ---- static bool assign_log_stats(bool newval, bool doit, GucSource source); static bool assign_transaction_read_only(bool newval, bool doit, GucSource source); + static void ReadConfigFile(char *filename, GucContext context); /* * Debugging options *************** *** 1701,1715 **** NULL, assign_custom_variable_classes, NULL }, /* End-of-list marker */ { {NULL, 0, 0, NULL, NULL}, NULL, NULL, NULL, NULL } }; - /******** end of options list ********/ /* * To allow continued support of obsolete names for GUC variables, we apply * the following mappings to any unrecognized name. Note that an old name --- 1709,1748 ---- NULL, assign_custom_variable_classes, NULL }, + { + {"pgdata", PGC_POSTMASTER, 0, gettext_noop("Sets the location of the data directory"), NULL}, + &guc_pgdata, + NULL, NULL, NULL + }, + + { + {"hba_conf", PGC_SIGHUP, 0, gettext_noop("Sets the location of the \"hba\" configuration file"), NULL}, + &guc_hbafile, + NULL, NULL, NULL + }, + + { + {"ident_conf", PGC_SIGHUP, 0, gettext_noop("Sets the location of the \"ident\" configuration file"), NULL}, + &guc_identfile, + NULL, NULL, NULL + }, + + { + {"external_pidfile", PGC_POSTMASTER, 0, gettext_noop("Writes the postmaster PID to the specified file"), NULL}, + &external_pidfile, + NULL, NULL, NULL + }, + /* End-of-list marker */ { {NULL, 0, 0, NULL, NULL}, NULL, NULL, NULL, NULL } }; + /******** end of options list ********/ + /* * To allow continued support of obsolete names for GUC variables, we apply * the following mappings to any unrecognized name. Note that an old name Index: src/backend/utils/misc/postgresql.conf.sample =================================================================== RCS file: /cvsroot/pgsql-server/src/backend/utils/misc/postgresql.conf.sample,v retrieving revision 1.113 diff -c -c -r1.113 postgresql.conf.sample *** src/backend/utils/misc/postgresql.conf.sample 7 Apr 2004 05:05:50 -0000 1.113 --- src/backend/utils/misc/postgresql.conf.sample 11 Jul 2004 00:07:09 -0000 *************** *** 22,27 **** --- 22,37 ---- #--------------------------------------------------------------------------- + # CONFIGURATION FILES + #--------------------------------------------------------------------------- + + # pgdata = '/usr/local/pgsql/data' # use data in another directory + # hba_conf = '/etc/pgsql/pg_hba.conf' # use hba info in another directory + # ident_conf = '/etc/pgsql/pg_ident.conf' # use ident info in another directory + # external_pidfile= '/var/run/postgresql.pid' # write an extra pid file + + + #--------------------------------------------------------------------------- # CONNECTIONS AND AUTHENTICATION #--------------------------------------------------------------------------- Index: src/include/utils/guc.h =================================================================== RCS file: /cvsroot/pgsql-server/src/include/utils/guc.h,v retrieving revision 1.48 diff -c -c -r1.48 guc.h *** src/include/utils/guc.h 1 Jul 2004 00:51:44 -0000 1.48 --- src/include/utils/guc.h 11 Jul 2004 00:07:10 -0000 *************** *** 135,140 **** --- 135,147 ---- extern int client_min_messages; extern int log_min_duration_statement; + extern char *guc_pgdata; + extern char *guc_hbafile; + extern char *guc_identfile; + extern char *external_pidfile; + + extern char *user_pgconfig; + extern bool user_pgconfig_is_dir; extern void SetConfigOption(const char *name, const char *value, GucContext context, GucSource source);