Run the commands below from the master node as gpadmin
user in order to validate basic functionality of the Greenplum cluster.
Refresh the environment variables:
$ source ~/.bashrc
Show the state of the Greenplum cluster:
$ gpstate
Connect to the
postgres
database and check segment configuration information:$ psql postgres
postgres=# SELECT * FROM gp_segment_configuration ORDER BY hostname;
Once connected to the
postgres
database, verify that you can create a table, insert data to it and read it:postgres=# CREATE TABLE t AS SELECT generate_series(1, 1000000);
postgres=# SELECT MIN(cnt), MAX(cnt), COUNT(cnt) FROM (SELECT COUNT(*) cnt FROM t GROUP BY gp_segment_id) tt;
postgres=# DROP TABLE t;