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

Viewing Parameter Values

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

Procedure

  1. Connect to a database. For details, see Connecting to a Database.
  2. View the parameter values in the database.

    • Method 1: Run the SHOW command.
      • Run the following command to view the value of a certain parameter:
        1
        openGauss=# SHOW server_version;
        

        server_version indicates the database version.

      • Run the following command to view values of all parameters:
        1
        openGauss=#  SHOW ALL;
        
    • Method 2: Query the pg_settings view.
      • Run the following command to view the value of a certain parameter:
        1
        openGauss=# SELECT * FROM pg_settings WHERE NAME='server_version';
        
      • Run the following command to view values of all parameters:
        1
        openGauss=# SELECT * FROM pg_settings;
        

Example

View the server version.

1
2
3
4
5
openGauss=# SHOW server_version;
 server_version 
----------------
 9.2.4
(1 row)