Pivotal Knowledge Base

Follow

GPCC is not displaying statistics information

Environment

Product Version
Pivotal Greenplum (GPDB) 4.3.x
OS RHEL 6.x
Pivotal Greenplum Command Center (GPCC)  All versions

Symptom

Pivotal Greenplum Command Center (GPCC) is not displaying statistics information and errors are seen when querying gpperfmon tables.

An example is shown below:

gpperfmon=# SELECT * from diskspace_history;
ERROR: relation with OID 18332 does not exist (seg119 slice1 sdw20.gphd.local:1030 pid=329258)

Cause 

The pg_class index for gpperfmon database for the segment instance in question was found to be corrupted.

Resolution

REINDEX of pg_class table on gpperfmon database was needed to resolve the issue.

Please see the detailed steps listed below to diagnose the problem and fix it.

1. Connect to the gpperfmon database directly on the segment instance using psql in utility mode.

An example is shown below:

PGOPTIONS='-c gp_session_role=utility' psql -h sdw20 -p 1030 gpperfmon

2. Once connected on the segment instance, find out if you can search for the OID from pg_class and it should return 0 lines.

An example is shown below:

gpperfmon=# SELECT * from pg_class where oid=18332;
relname | relnamespace | reltype | relowner | relam | relfilenode | reltablespace | relpages | reltuples | reltoastrelid | reltoastidxid | relaosegrelid | relaosegidxid | relhasindex | relis
shared | relkind | relstorage | relnatts | relchecks | reltriggers | relukeys | relfkeys | relrefs | relhasoids | relhaspkey | relhasrules | relhassubclass | relfrozenxid | relacl | reloption
s
---------+--------------+---------+----------+-------+-------------+---------------+----------+-----------+---------------+---------------+---------------+---------------+-------------+------

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

(0 rows)

Time: 93.129 ms
gpperfmon=#

3. Turn off indexing and then retry the same command from step 2. If it is an indexing corruption issue, then it will provide you lines that were not available previously when indexing was on.

An example is shown below:

gpperfmon=# set enable_indexscan =off;
SET
Time: 0.480 ms

gpperfmon=# set enable_bitmapscan = off;
SET
Time: 0.248 ms

 

gpperfmon=# SELECT * from pg_class where oid=18332;
relname | relnamespace | reltype | relowner | relam | relfilenode | reltablespace | relpages | reltuples | reltoastrelid | reltoastidxid | relaosegrelid | relaosegidxid | r
elhasindex | relisshared | relkind | relstorage | relnatts | relchecks | reltriggers | relukeys | relfkeys | relrefs | relhasoids | relhaspkey | relhasrules | relhassubclass | relfrozenxid |
relacl | reloptions

---------------------------+--------------+---------+----------+-------+-------------+---------------+----------+-----------+---------------+---------------+---------------+---------------+--
-----------+-------------+---------+------------+----------+-----------+-------------+----------+----------+---------+------------+------------+-------------+----------------+--------------+-
-------------------------------------------+------------------
diskspace_history_1_prt_1 | 2200 | 18333 | 10 | 0 | 18332 | 0 | 0 | 0 | 18334 | 0 | 0 | 0 | f
| f | r | h | 6 | 1 | 0 | 0 | 0 | 0 | f | f | f | f | 1115 |
{gpadmin=arwdDxt/gpadmin,=arwdDxt/gpadmin} | {fillfactor=100}
(1 row)
Time: 108.291 ms
gpperfmon=#

4. REINDEX pg_class making sure that you connect to the gpperfmon database from the master.

An example is shown below:

gpperfmon=# REINDEX TABLE pg_class ;

 

Comments

Powered by Zendesk