Skip to content

Commit

Permalink
pg_vacuum.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDBA authored Jul 31, 2023
1 parent 3240009 commit 688e7b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pg_vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def getload():
'''

def get_query_cnt(conn, cur):
sql = "select count(*) from pg_stat_activity where state = 'active' and application_name = 'pg_vacuum' and query like 'VACUUM (FREEZE VERBOSE)%' OR query like 'VACUUM (ANALYZE VERBOSE%' OR query like 'VACUUM (VERBOSE%' OR query like 'ANALYZE VERBOSE%'"
sql = "select count(*) from pg_stat_activity where state = 'active' and application_name = 'pg_vacuum' and query like 'VACUUM (FREEZE, VERBOSE)%' OR query like 'VACUUM (ANALYZE, VERBOSE%' OR query like 'VACUUM (VERBOSE%' OR query like 'ANALYZE VERBOSE%'"
cur.execute(sql)
rows = cur.fetchone()
return int(rows[0])
Expand Down

0 comments on commit 688e7b6

Please sign in to comment.