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

Viewing 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. Log in to the host where CN is located as the cluster installation user.
  2. Connect to the database. For details, see "Database Quick Start > Connecting to a Database > Using gsql to Connect to a Database" in Developer Guide.
  3. View the GUC parameter values in the database.

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

        server_version indicates the database version.

      • 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='server_version';
        
      • View values of all parameters.
        1
        gaussdb=# SELECT * FROM pg_settings;
        

Example

Check the character encoding type of the client.

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