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.
1gpstart

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

- Log in to the database as the gpadmin user.
1psql -d Database_name
In the preceding command, Database_name indicates the created database.
- Check the mirror status as the gpadmin user.
1gpstate -e - Check the standby master status as the gpadmin user.
1gpstate -f - Check the status of the Greenplum cluster as the gpadmin user.
1gpstate -b - Check the Greenplum version as the gpadmin user.
1gpstate -i
Modifying Segment Parameters
- Modify Segment parameters as the gpadmin user.
- Method 1: Update parameters in the postgresql.conf file of the target Segment.
1echo gp_vmem_protect_limit=12888 >>postgresql.conf
- Method 2: Use the gpconfig tool to modify the Greenplum Segment parameter.
1gpconfig -c gp_vmem_protect_limit -v 12888
- Method 1: Update parameters in the postgresql.conf file of the target Segment.
- Restart the Greenplum database as the gpadmin user for the settings to take effect. During the restart, enter Y to confirm the restart.
1gpstop -r
Modifying Master Parameters
- Modify master parameters as the gpadmin user.
1echo gp_vmem_protect_limit=12888 >>postgresql.conf
- 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

Parent topic: Using the Database