From 5001751af146f3d0c2a32c30818577eef423d2b1 Mon Sep 17 00:00:00 2001 From: Pengzhou Tang Date: Wed, 11 Apr 2018 23:28:30 -0400 Subject: [PATCH] Fix 'distribution_policy' issue on replicated table by gpcheckcat 'distribution_policy' test do constraints check on randomly-distributed tables, however, attrnums = null in gp_distribution_policy is no longer effective to identify a randomly distributed table after we involved new replicated distributed policy, so add more filter to make things right. --- gpMgmt/bin/gpcheckcat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpMgmt/bin/gpcheckcat b/gpMgmt/bin/gpcheckcat index 11e4953f87..4b345dac6c 100755 --- a/gpMgmt/bin/gpcheckcat +++ b/gpMgmt/bin/gpcheckcat @@ -461,7 +461,7 @@ def checkDistribPolicy(): join pg_class rel on (pk.conrelid = rel.oid) join pg_namespace n on (rel.relnamespace = n.oid) join gp_distribution_policy d on (rel.oid = d.localoid) - where pk.contype in('p', 'u') and d.attrnums is null + where pk.contype in('p', 'u') and d.policytype = 'p' and d.attrnums is null ''' db = connect2(GV.cfg[1]) @@ -502,7 +502,7 @@ def checkDistribPolicy(): join pg_class rel on (pk.conrelid = rel.oid) join pg_namespace n on (rel.relnamespace = n.oid) join gp_distribution_policy d on (rel.oid = d.localoid) - where pk.contype in ('p', 'u') and + where pk.contype in ('p', 'u') and d.policytype = 'p' and (d.attrnums is null or not d.attrnums operator(pg_catalog.<@) pk.conkey) ''' -- GitLab