greenplum 5.7 + gpcheckcat详解数据库

gpcheckcat

查看帮助

[[email protected] bin]$ gpcheckcat -? 
 
Usage: gpcheckcat [<option>] [dbname] 
 
    -? 
    -B parallel: number of worker threads 
    -g dir     : generate SQL to rectify catalog corruption, put it in dir 
    -p port    : DB port number 
    -P passwd  : DB password 
    -U uname   : DB User Name 
    -v         : verbose 
    -A         : all databases 
    -S option  : shared table options (none, only) 
    -O         : Online 
    -l         : list all tests 
    -R test    : run this particular test 
    -C catname : run cross consistency, FK and ACL tests for this catalog table

gpcheckcat -l

查看check项目

[[email protected] bin]$ gpcheckcat -l 
 
List of gpcheckcat tests: 
 
   unique_index_violation: Check for violated unique indexes 
                duplicate: Check for duplicate entries 
       missing_extraneous: Cross consistency check for missing or extraneous entries 
             inconsistent: Cross consistency check for master segment inconsistency 
              foreign_key: Check foreign keys 
                      acl: Cross consistency check for access control privileges 
               persistent: Check persistent tables 
                  pgclass: Check pg_class entry that does not have any correspond pg_attribute entry 
                namespace: Check for schemas with a missing schema definition 
      distribution_policy: Check constraints on randomly distributed tables 
               dependency: Check for dependency on non-existent objects 
                    owner: Check table ownership that is inconsistent with the master database 
           part_integrity: Check pg_partition branch integrity, partition with oids, partition distribution policy 
          part_constraint: Check constraints on partitioned tables 
     duplicate_persistent: Check for duplicate gp_persistent_relation_node entries 
       mirroring_matching: Check that configured mirroring and segments' mirroring agree

gpcheckcat -R persistent

[[email protected] bin]$ gpcheckcat -R persistent -p 5432 peiybdb 
Truncated batch size to number of primaries: 3 
 
Connected as user 'gpadmin' to database 'peiybdb', port '5432', gpdb version '5.0' 
------------------------------------------------------------------- 
Batch size: 3 
Performing test 'persistent' 
Total runtime for test 'persistent': 0:00:00.51 
 
SUMMARY REPORT 
=================================================================== 
Completed 1 test(s) on database 'peiybdb' at 2018-05-08 17:54:51 with elapsed time 0:00:00 
Found no catalog issue 

gpcheckcat -R pgclass

[[email protected] bin]$ gpcheckcat -R pgclass -p 5432 peiybdb 
Truncated batch size to number of primaries: 3 
 
Connected as user 'gpadmin' to database 'peiybdb', port '5432', gpdb version '5.0' 
------------------------------------------------------------------- 
Batch size: 3 
Performing test 'pgclass' 
Total runtime for test 'pgclass': 0:00:00.01 
 
SUMMARY REPORT 
=================================================================== 
Completed 1 test(s) on database 'peiybdb' at 2018-05-08 17:56:44 with elapsed time 0:00:00 
Found no catalog issue 

gpcheckcat -R namespace

[[email protected] bin]$ gpcheckcat -R namespace -p 5432 peiybdb 
Truncated batch size to number of primaries: 3 
 
Connected as user 'gpadmin' to database 'peiybdb', port '5432', gpdb version '5.0' 
------------------------------------------------------------------- 
Batch size: 3 
Performing test 'namespace' 
Total runtime for test 'namespace': 0:00:00.02 
 
SUMMARY REPORT 
=================================================================== 
Completed 1 test(s) on database 'peiybdb' at 2018-05-08 17:57:46 with elapsed time 0:00:00 
Found no catalog issue 

gpcheckcat -R distribution_policy

[[email protected] bin]$ gpcheckcat -R distribution_policy -p 5432 peiybdb 
Truncated batch size to number of primaries: 3 
 
Connected as user 'gpadmin' to database 'peiybdb', port '5432', gpdb version '5.0' 
------------------------------------------------------------------- 
Batch size: 3 
Performing test 'distribution_policy' 
Total runtime for test 'distribution_policy': 0:00:00.00 
 
SUMMARY REPORT 
=================================================================== 
Completed 1 test(s) on database 'peiybdb' at 2018-05-08 17:58:19 with elapsed time 0:00:00 
Found no catalog issue 

gpcheckcat -R dependency

[[email protected] bin]$ gpcheckcat -R dependency -p 5432 peiybdb 
Truncated batch size to number of primaries: 3 
 
Connected as user 'gpadmin' to database 'peiybdb', port '5432', gpdb version '5.0' 
------------------------------------------------------------------- 
Batch size: 3 
Performing test 'dependency' 
Total runtime for test 'dependency': 0:00:00.31 
 
SUMMARY REPORT 
=================================================================== 
Completed 1 test(s) on database 'peiybdb' at 2018-05-08 17:58:44 with elapsed time 0:00:00 
Found no catalog issue 

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/3873.html

(0)
上一篇 2021年7月16日
下一篇 2021年7月16日

相关推荐

发表回复

登录后才能评论