- Pivotal Greenplum (GPDB) All Versions
- OS All Supported Versions
"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>
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 segment with issues. 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/
Review the result:
$ cd gpcheckcat-depshow-20160527-104527/
lpetrovmac:gpcheckcat-depshow-20160527-104527 lpetrov$ ls -l
-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_class 34234 $
Review generated output for segment 1:
$ cat depshow_content1_lpetrov.sh
pg_class 34234 $
Here are the Related Tools: GPMT (Greenplum Magic Tool)
|Tool Version||Points of Contact||Revision Date||Upgrade or Modification details|
|GPMT gpcheckcat log -pgclass_extra Utility 1.0.0||Lubomir Petrov||March 13, 2016||First Version created|