gpcheckcat
The gpcheckcat
utility tests Apache Cloudberry catalog tables for inconsistencies.
The utility is in $GPHOME/bin/lib
.
Synopsis
gpcheckcat [ <options<] [ <dbname>]
Options:
-g <dir>
-p <port>
-s <test_name | 'test_name1, test_name2 [, ...]'>
-P <password>
-U <user_name>
-S {none | only}
-O
-R <test_name | 'test_name1, test_name2 [, ...]'>
-C <catalog_name>
-B <parallel_processes>
-v
-A
-x "<parameter_name>=<value>"
gpcheckcat -l
gpcheckcat -? | --help
Description
The gpcheckcat
utility runs multiple tests that check for database catalog inconsistencies. Some of the tests cannot be run concurrently with other workload statements or the results will not be usable. Restart the database in restricted mode when running gpcheckcat
, otherwise gpcheckcat
might report inconsistencies due to ongoing database operations rather than the actual number of inconsistencies. If you run gpcheckcat
without stopping database activity, run it with -O
option.
Note Any time you run the utility, it checks for and deletes orphaned, temporary database schemas (temporary schemas without a session ID) in the specified databases. The utility displays the results of the orphaned, temporary schema check on the command line and also logs the results.
Catalog inconsistencies are inconsistencies that occur between Apache Cloudberry system tables. In general, there are three types of inconsistencies:
-
Inconsistencies in system tables at the segment level. For example, an inconsistency between a system table that contains table data and a system table that contains column data. As another, a system table that contains duplicates in a column that should to be unique.
-
Inconsistencies between same system table across segments. For example, a system table is missing row on one segment, but other segments have this row. As another example, the values of specific row column data are different across segments, such as table owner or table access privileges.
-
Inconsistency between a catalog table and the filesystem. For example, a file exists in database directory, but there is no entry for it in the pg_class table.