20.2. File Locations
In addition to the
two other manually-edited configuration files, which control
client authentication (their use is discussed in
). By default, all three
configuration files are stored in the database cluster's data
directory. The parameters described in this section allow the
configuration files to be placed elsewhere. (Doing so can ease
administration. In particular it is often easier to ensure that
the configuration files are properly backed-up when they are
Specifies the directory to use for data storage. This parameter can only be set at server start.
Specifies the main server configuration file (customarily called
postgresql.conf). This parameter can only be set on the
Specifies the configuration file for host-based authentication (customarily called
pg_hba.conf). This parameter can only be set at server start.
Specifies the configuration file for user name mapping (customarily called
pg_ident.conf). This parameter can only be set at server start. See also Section 21.2 .
Specifies the name of an additional process-ID (PID) file that the server should create for use by server administration programs. This parameter can only be set at server start.
In a default installation, none of the above parameters are set
explicitly. Instead, the
data directory is specified by the
option or the
environment variable, and the
configuration files are all found within the data directory.
If you wish to keep the configuration files elsewhere than the
data directory, the
command-line option or
must point to the directory containing the configuration files,
parameter must be set in
(or on the command line) to show
where the data directory is actually located. Notice that
for the location
of the data directory, but not for the location of the configuration
If you wish, you can specify the configuration file names and locations
individually using the parameters
can only be specified on the
command line, but the others can be
set within the main configuration file. If all three parameters plus
are explicitly set, then it is not necessary
When setting any of these parameters, a relative path will be interpreted
with respect to the directory in which