diff options
author | Bruce Momjian <bruce@momjian.us> | 2004-07-11 00:18:45 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2004-07-11 00:18:45 +0000 |
commit | 130f89e93f59cdb4b160cbc31e6929de25d13794 (patch) | |
tree | 7ac3acd73f01020a12fe37d9c6e89547dcae2f46 /src/backend/utils/misc/guc.c | |
parent | b4a98c5fcc6b418912dde8e8ce3a8a486cbe4c85 (diff) | |
download | postgresql-130f89e93f59cdb4b160cbc31e6929de25d13794.tar.gz postgresql-130f89e93f59cdb4b160cbc31e6929de25d13794.zip |
Allow configuration files to be placed outside the data directory.
Add new postgresql.conf variables to point to data, pg_hba.conf, and
pg_ident.conf files.
Needs more documentation.
Diffstat (limited to 'src/backend/utils/misc/guc.c')
-rw-r--r-- | src/backend/utils/misc/guc.c | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 7e4f0ebc001..9c8f8b5cc6d 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -10,7 +10,7 @@ * Written by Peter Eisentraut <peter_e@gmx.net>. * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.213 2004/07/05 23:14:14 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.214 2004/07/11 00:18:44 momjian Exp $ * *-------------------------------------------------------------------- */ @@ -57,6 +57,13 @@ #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,6 +114,7 @@ static bool assign_stage_log_stats(bool newval, bool doit, GucSource source); 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,15 +1709,40 @@ static struct config_string ConfigureNamesString[] = 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 ********/ +/******** 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 |