Pivotal Knowledge Base


Greenplum Magic Tool (GPMT) gpcheckcat -depshow Utility


  • Pivotal Greenplum Database (GPDB) 4.3.x
  • Operating System- Red Hat Enterprise Linux (RHEL) 6.x


"gpmt gpcheckcat" is a tool to help users with analyzing gpcheckcat log file. The "-depshow" action reads is designed to help with analyzing the extra/orphan "pg_depend" table entries.

This is a complement to "gpcheckcat". The "gpcheckcat" tool's "dependency" test will build and run a query to discover "pg_depend" extra/orphan entries but will provide only the summary as output. Details cannot be viewed without running the dependency check query manually. The "gpmt gpcheckcat -depshow" utility builds and runs the dependency query (on all segments) and provides detailed output for each segment with issues.

This tool should be run on the master server on the target database as it connects to the database to run the query.


./gpmt gpcheckcat -depshow -db <database-name>


"-depshow" Action

The tool does:

  • connect to the destination database. It assumes default parameters. If there are nondefault host/port/username, please use the environment variables (PGHOST, PGPORT, PGUSER)
  • does the following steps for each segment:
    • generate the gpcheckcat dependency query
    • run the gpcheckcat dependency query
    • generate one file per segment for the segment with issues. The file contains details about the problems found. See example below.


  • -db <database-name> - this is the database to which the tool will connect to examine "pg_depend" table
  • environment variables PGHOST/PGPORT/PGUSER to tune the connection


Setup: Database "lpetrov" has some "broken" orphan entries in "pg_depend" on master (-1) and one segment (content 1).

Execute the utility: 

$ ./gpmt gpcheckcat -depshow -db lpetrov 
Output written in directory gpcheckcat-depshow-20160527-104527/
Done. $

Review the result: 

$ cd gpcheckcat-depshow-20160527-104527/
lpetrovmac:gpcheckcat-depshow-20160527-104527 lpetrov$ ls -l
total 16
-rw-r--r-- 1 lpetrov staff 65 May 27 10:45 depshow_content-1_lpetrov.sh
-rw-r--r-- 1 lpetrov staff 65 May 27 10:45 depshow_content1_lpetrov.sh $

Review generated output for segment -1: 

$ cat depshow_content-1_lpetrov.sh 
pg_type 123123
pg_class 34234 $

Review generated output for segment 1: 

$ cat depshow_content1_lpetrov.sh 
pg_type 123123
pg_class 34234 $

Additional Information

Here are the Related Tools: GPMT (Greenplum Magic Tool)


Powered by Zendesk