我要评分
获取效率
正确性
完整性
易理解

Managing the Database

This section describes the common database commands and operations, for reference only. They are not mandatory for installing the database.

Basic Commands

  • Start the Greenplum database as the gpadmin user. Enter Y as prompted.
    1
    gpstart
    

  • Stop the Greenplum database as the gpadmin user. Enter Y as prompted.
    1
    gpstop
    

  • Log in to the database as the gpadmin user.
    1
    psql -d Database_name
    

    In the preceding command, Database_name indicates the created database.

  • Check the mirror status as the gpadmin user.
    1
    gpstate -e
    
  • Check the standby master status as the gpadmin user.
    1
    gpstate -f
    
  • Check the status of the Greenplum cluster as the gpadmin user.
    1
    gpstate -b
    
  • Check the Greenplum version as the gpadmin user.
    1
    gpstate -i
    

Modifying Segment Parameters

  1. Modify Segment parameters as the gpadmin user.
    • Method 1: Update parameters in the postgresql.conf file of the target Segment.
      1
      echo gp_vmem_protect_limit=12888 >>postgresql.conf
      
    • Method 2: Use the gpconfig tool to modify the Greenplum Segment parameter.
      1
      gpconfig -c gp_vmem_protect_limit -v 12888
      
  2. Restart the Greenplum database as the gpadmin user for the settings to take effect. During the restart, enter Y to confirm the restart.
    1
    gpstop -r
    

Modifying Master Parameters

  1. Modify master parameters as the gpadmin user.
    1
    echo gp_vmem_protect_limit=12888 >>postgresql.conf
    
  2. Restart the Greenplum database as the gpadmin user for the settings to take effect. During the restart, enter Y to confirm the restart.
    gpstop -r