Updated on 2026-10-21 GMT+08:00

Viewing Parameters

Viewing GUC Parameters

GaussDB uses a set of default GUC parameters after it is installed. You can modify the GUC parameters to enable GaussDB to better fit your service scenarios and data volume.

Procedure

  1. Connect to the database. For details, see "Database Quick Start > Connecting to a Database > Using gsql to Connect to a Database" in Developer Guide.
  2. Check the value of the GUC parameter.

    • Method 1: Run the SHOW command.
      • View the value of a certain parameter.
        1
        gaussdb=# SHOW client_encoding;
        

        The client_encoding parameter is used to check the character encoding type of the client.

      • View values of all parameters.
        1
        gaussdb=# SHOW ALL;
        
    • Method 2: Query the pg_settings view.
      • View the value of a certain parameter.
        1
        gaussdb=# SELECT * FROM pg_settings WHERE NAME='client_encoding';
        
      • View values of all parameters.
        1
        gaussdb=# SELECT * FROM pg_settings;
        

Examples

Check the character encoding type of the client.

1
2
3
4
5
gaussdb=# SHOW client_encoding;
 client_encoding 
----------------
 UTF8
(1 row)

Viewing CM Parameters

You can view CM parameters in the configuration files or by running commands.

  • Viewing parameters in the configuration files

    You can view CM Agent parameters in the cm_agent.conf file in the CM Agent data directory and CM Server parameters in the cm_server.conf file in the CM Server data directory.

  • Viewing parameters by running commands
    cm_ctl list --param {--agent | --server} [-n NODEID]
    Parameters
    • --agent: lists CM Agent parameters.
    • --server: lists CM Server parameters.
    • -n NODEID: lists the CM parameters of a specified node. NODEID indicates the node name, which can be queried by running the cm_ctl query -Cv command.
    Examples
    • List CM Agent parameters.
      cm_ctl list --param --agent
    • List CM Server parameters.
      cm_ctl list --param --server