Updated on 2023-10-23 GMT+08:00

File Location

After a database has been installed, three configuration files (postgresql.conf, pg_hba.conf, and pg_ident.conf) are automatically generated and saved in the data directory. You can use the methods described in this section to change the names and save paths of these configuration files.

When changing the storage directory of a configuration file, set data_directory in postgresql.conf to the actual data directory.

If a configuration file is incorrectly modified, the database will be seriously affected. Do not modify the configuration files mentioned in this section after installation.

data_directory

Parameter description: Specifies the GaussDB data directory. Only users with the sysadmin permission can access this parameter. You can set this parameter using one of the following methods:
  • Set it when you install the GaussDB.
  • This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: a string, consisting of one or more characters

Default value: Specify this parameter during installation. If this parameter is not specified during installation, the database is not initialized by default.

config_file

Parameter description: Specifies the configuration file (postgresql.conf) of the primary server.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: a string, consisting of one or more characters

Default value: postgresql.conf (The absolute directory of this file may be displayed in the actual situation.)

hba_file

Parameter description: Specifies the configuration file (pg_hba.conf) for host-based authentication (HBA). This parameter can be specified only in the postgresql.conf file and can be accessed only by users with the sysadmin permission.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: a string

Default value: pg_hba.conf (The absolute directory of this file may be displayed in the actual situation.)

ident_file

Parameter description: Specifies the name of the configuration file (pg_ident.conf) for client authentication. Only users with the sysadmin permission can access this parameter.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: a string

Default value: pg_ident.conf (The absolute directory of this file may be displayed in the actual situation.)

external_pid_file

Parameter description: Specifies the extra PID file that can be used by the server management program. Only the sysadmin user can access this parameter.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

This parameter takes effect only after the database restarts.

Value range: a string

Default value: empty

enable_default_cfunc_libpath

Parameter description: Specifies whether the default path is used for the .so file when the C function is created in GaussDB.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: Boolean

on: indicates that the .so file must be placed in the specified directory ($libdir/proc_srclib) when the C function is created.

off: indicates that the .so file can be stored in any accessible directory when the C function is created.

Default value: on

If this parameter is set to off, the .so file can be placed in any accessible directory or the .so file provided by the system can be used, which poses security risks. Therefore, you are not advised to set this parameter to off.