MogDB
Ecological Tools
Doc Menu

Viewing Parameter Values

MogDB 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. Log in as the OS user omm to the primary node of the database.
  2. Run the following command to connect to the database:

    gsql -d mogdb -p 8000

    mogdb is the name of the database to be connected, and 8000 is the port number of the database primary node.

    If information similar to the following is displayed, the connection succeeds:

    gsql ((mogdb x.x.x build 290d125f) compiled at 2020-12-08 02:59:43 commit 2143 last mr 131
    Non-SSL connection (SSL connection is recommended when requiring high-security)
    Type "help" for help.
        
    mogdb=# 
  3. 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:

        SHOW server_version;

        server_version indicates the database version.

      • Run the following command to view values of all parameters:

        SHOW ALL;
    • Method 2: Query the pg_settings view.

      • Run the following command to view the value of a certain parameter:

        SELECT * FROM pg_settings WHERE NAME='server_version';
      • Run the following command to view values of all parameters:

        SELECT * FROM pg_settings;

Example

View the server version.

mogdb=# SHOW server_version;
 server_version 
----------------
 9.2.4
(1 row)