Updated on 2024-03-27 GMT+08:00

Configuration Description

Configuration Method

Modify the pg_hba.conf file on the GaussDB database server.

pg_hba.conf Configuration Requirements

Modify the pg_hba.conf file from top to bottom. The configuration priorities are in descending order.

pg_hba.conf Configuration Format

Each allowlist rule must comply with the following format: TYPE DATABASE USER ADDRESS METHOD.

  • TYPE: The value can be local or host. local is used only for Unix domain socket connections. For external use, set this parameter to host.
  • DATABASE: Name of a database to be connected. The logical replication connection is different from a common connection and must be set to replication.
  • USER: Name of user to be connected.
  • ADDRESS: All IP addresses or a specified IP address of a client that initiates the connection.
  • METHOD: Authentication method. The value can be trust or sha256. trust is used for connections between internal nodes, for example, connection between CNs and DNs. sha256 is used for connections between external nodes.