Skip to content

Commit

Permalink
Fix silly oversight
Browse files Browse the repository at this point in the history
  • Loading branch information
marco44 committed Feb 16, 2025
1 parent 4c119fa commit 6c17bdd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions powa/sql/views_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,10 @@ def BASE_QUERY_PGSA_SAMPLE(per_db=False):
if per_db:
extra = """JOIN {powa}.powa_catalog_databases d
ON d.oid = pgsa_history.datid and d.srvid = pgsa_history.srvid
WHERE d.datname = %(database)s"""
WHERE d.datname = %(database)s
AND backend_type <> 'autovacuum worker'"""
else:
extra = ""
extra = "WHERE backend_type <> 'autovacuum worker'"

# We use dense_rank() as we need ALL the records for a specific ts
return """
Expand Down Expand Up @@ -546,7 +547,6 @@ def BASE_QUERY_PGSA_SAMPLE(per_db=False):
AND pgsac.srvid = %(server)s
) AS pgsa_history
{extra}
AND backend_type <> 'autovacuum worker'
) AS pgsa
WHERE number %% ( int8larger((total)/(%(samples)s+1),1) ) = 0
""".format(extra=extra)
Expand Down

0 comments on commit 6c17bdd

Please sign in to comment.