From 7ca3a0f3e28e9d89d390214f6be59d7c8e88d367 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 8 Oct 2004 01:36:36 +0000 Subject: Whack some sense into the configuration-file-location patch. Refactor code into something reasonably understandable, cause use of the feature to not fail in standalone backends or in EXEC_BACKEND case, fix sloppy guc.c table entries, make the documentation minimally usable. --- doc/src/sgml/ref/postgres-ref.sgml | 4 +-- doc/src/sgml/ref/postmaster.sgml | 32 ++++++++++------------ doc/src/sgml/runtime.sgml | 56 +++++++++++++++++++++++++++++++++----- 3 files changed, 65 insertions(+), 27 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/postgres-ref.sgml b/doc/src/sgml/ref/postgres-ref.sgml index cfb16a78686..b0a5f920a9e 100644 --- a/doc/src/sgml/ref/postgres-ref.sgml +++ b/doc/src/sgml/ref/postgres-ref.sgml @@ -1,5 +1,5 @@ @@ -357,7 +357,7 @@ PostgreSQL documentation - Default data direction location + Default data directory location diff --git a/doc/src/sgml/ref/postmaster.sgml b/doc/src/sgml/ref/postmaster.sgml index d7255dc87f7..518f958e519 100644 --- a/doc/src/sgml/ref/postmaster.sgml +++ b/doc/src/sgml/ref/postmaster.sgml @@ -1,5 +1,5 @@ @@ -67,27 +67,22 @@ PostgreSQL documentation 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). + location (the 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 + at one time, so 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 + When the postmaster starts it needs + to know the location of the data area. + The location must be 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 variable 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. + Typically, or PGDATA points + directly to the data area directory created by initdb. + Other possible file layouts are discussed in + . @@ -154,8 +149,9 @@ PostgreSQL documentation - Specifies the file system location of the data directory. See - discussion above. + Specifies the file system location of the data directory or + configuration file(s). See + for details. @@ -394,7 +390,7 @@ PostgreSQL documentation - Default data direction location + Default data directory location diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 22e75ae0eb3..f6946a08e18 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -1,5 +1,5 @@ @@ -564,17 +564,16 @@ SET ENABLE_SEQSCAN TO OFF; any desired selection condition. - - Configuration Files + + File Locations - pgdata (string) - Specifies the directory to use for data storage (everything except - configuration files). + Specifies the directory to use for data storage. + This option can only be set at server start. @@ -585,6 +584,8 @@ SET ENABLE_SEQSCAN TO OFF; Specifies the file name to use for configuration of host-based authentication (HBA). + This option can only be set at server start or in the + postgresql.conf file. @@ -595,6 +596,8 @@ SET ENABLE_SEQSCAN TO OFF; Specifies the file name to use for configuration of ident authentication. + This option can only be set at server start or in the + postgresql.conf file. @@ -605,11 +608,50 @@ SET ENABLE_SEQSCAN TO OFF; Specifies the location of an additional postmaster process-id (PID) file for use by server administration programs. + This option can only be set at server start. - + + + In a default installation, none of the above options is set explicitly + in the postgresql.conf file. In this case, the + data directory is specified by the command-line + option or the PGDATA environment variable; there is no + default for it. The configuration files are all placed within the + data directory. + + + + It is also possible to separate the configuration files from the data + directory, which can ease administration. (In particular it is often + easier to ensure that the configuration files are properly backed-up + when they are kept separate.) To do this, the + command-line option or PGDATA environment variable + must point to the directory containing the configuration files, + and the pgdata option is set in + postgresql.conf (or on the command line) to show + where the data directory is actually located. + + + + If you wish, you can also make the + command-line option or PGDATA environment variable + point directly to the master configuration file (which then need not be + named postgresql.conf). The pgdata + option must be set to determine the data directory location. + The other configuration files will by default be sought + in the data directory. + + + + With any of these approaches, you can specify the locations of the + secondary configuration files (pg_hba.conf and + pg_ident.conf) by setting hba_conf and/or + ident_conf in the master configuration file. These options + override the normal locations and names of the secondary files. + -- cgit v1.2.3