!951 gs_checkse工具用户最大连接数修复

Merge pull request !951 from zzh/bugfix
This commit is contained in:
opengauss_bot 2024-10-29 12:28:01 +00:00 committed by Gitee
commit 3dafabf651
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -2767,7 +2767,10 @@ def setUserConnection(data):
result.db = []
try:
for item in data.db:
sql_query = """ALTER ROLE %s CONNECTION LIMIT 1024;""" %(item.split("|")[0].strip())
user_to_modify = item.split("|")[0].strip()
if user_to_modify == getUserInfo().username:
continue
sql_query = """ALTER ROLE %s CONNECTION LIMIT 1024;""" % user_to_modify
getDatabaseInfo(result, sql_query)
except Exception as e:
data.errormsg = e.__str__()