How to check failed Segments

Post date: Nov 18, 2013 2:18:26 AM

1. On the master, run the gpstate utility with the -e option to show segments with error conditions:

$ gpstate -e

2. To get detailed information about a failed segment, check the gp_segment_configuration catalog table. For example:

$ psql -c "SELECT * FROM gp_segment_configuration WHERE status='d';"

[gpadmin@sachi gpsne-1]$ psql -d sachi

psql (8.2.15)

Type "help" for help.

sachi=# SELECT * FROM gp_segment_configuration;

 dbid | content | role | preferred_role | mode | status | port  | hostname | address | replication_port | san_mounts 

------+---------+------+----------------+------+--------+-------+----------+---------+------------------+------------

    1 |      -1 | p    | p              | s    | u      |  5432 | sachi    | sachi   |                  | 

    2 |       0 | p    | p              | s    | u      | 40000 | sachi    | sachi   |                  | 

    3 |       1 | p    | p              | s    | u      | 40001 | sachi    | sachi   |                  | 

(3 rows)

sachi=# SELECT * FROM gp_segment_configuration WHERE status='d';

 dbid | content | role | preferred_role | mode | status | port | hostname | address | replication_port | san_mounts 

------+---------+------+----------------+------+--------+------+----------+---------+------------------+------------

(0 rows)

sachi=# 

To show information about mirror segment instances, run:

[gpadmin@sachi gpsne-1]$ gpstate -m

20131117:21:19:39:023443 gpstate:sachi:gpadmin-[INFO]:-Starting gpstate with args: -m

20131117:21:19:39:023443 gpstate:sachi:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 4.2.2.4 build 1 Community Edition'

20131117:21:19:39:023443 gpstate:sachi:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.2.15 (Greenplum Database 4.2.2.4 build 1 Community Edition) on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.4.2 compiled on Oct 17 2012 11:52:28'

20131117:21:19:39:023443 gpstate:sachi:gpadmin-[INFO]:-Obtaining Segment details from master...

20131117:21:19:39:023443 gpstate:sachi:gpadmin-[WARNING]:--------------------------------------------------------------

20131117:21:19:39:023443 gpstate:sachi:gpadmin-[WARNING]:-physical mirroring not used

20131117:21:19:39:023443 gpstate:sachi:gpadmin-[WARNING]:--------------------------------------------------------------