You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by av...@apache.org on 2024/12/30 08:26:04 UTC
(cloudberry) 01/10: Exclude AMs with internal handlers in gpcheckcat dependency checks
This is an automated email from the ASF dual-hosted git repository.
avamingli pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit f3ea5c6c5b86202b50591327bda03c94561296ca
Author: Adam Lee <ad...@vmware.com>
AuthorDate: Mon Sep 26 17:24:47 2022 +0800
Exclude AMs with internal handlers in gpcheckcat dependency checks
Creating AMs with internal handlers will not have entries in `pg_depend`,
which is reasonable since internal handlers could not be dropped, but
`gpcheckcat` is not happy with it.
This commit excludes that and fixes the `getName()` deprecated issue.
---
gpMgmt/bin/gpcheckcat | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/gpMgmt/bin/gpcheckcat b/gpMgmt/bin/gpcheckcat
index 5103cc746b..ecdd2d383f 100755
--- a/gpMgmt/bin/gpcheckcat
+++ b/gpMgmt/bin/gpcheckcat
@@ -392,7 +392,7 @@ class execThread(Thread):
def processThread(threads):
batch = []
for th in threads:
- logger.debug('waiting on thread %s' % th.getName())
+ logger.debug('waiting on thread %s' % th.name)
th.join()
if th.error:
setError(ERROR_NOREPAIR)
@@ -422,7 +422,7 @@ def connect2run(qry, col=None):
thread = execThread(c, db, qry)
thread.start()
logger.debug('launching query thread %s for dbid %i' %
- (thread.getName(), dbid))
+ (thread.name, dbid))
threads.append(thread)
# we don't want too much going on at once
@@ -914,9 +914,14 @@ def checkCatalogJoinDepend(catalogs):
# do drop their proclang handler functions) will be
# replacing language so this exclusion should be fine.
if str(cat) == 'pg_proc':
- qry += """
- AND pronamespace != {oid}
- """.format(oid=PG_CATALOG_OID)
+ qry += """AND pronamespace != {oid}
+ """.format(oid=PG_CATALOG_OID)
+
+ # Exclude pg_am entries which depend on internal handlers.
+ if str(cat) == 'pg_am':
+ qry = """
+ SELECT '{catalog}' AS catalog, pg_am.oid AS oid FROM {catalog} JOIN pg_proc ON pg_am.amhandler::text = pg_proc.proname WHERE pg_am.oid >= {oid} AND pg_proc.oid >= {oid}
+ """.format(catalog=cat, oid=FIRST_NORMAL_OID)
deps.append(qry)
@@ -1428,7 +1433,7 @@ def checkAOSegVpinfo():
thread = checkAOSegVpinfoThread(cfg, db_connection)
thread.start()
logger.debug('launching check thread %s for dbid %i' %
- (thread.getName(), dbid))
+ (thread.name, dbid))
threads.append(thread)
if (i % GV.opt['-B']) == 0:
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org