Skip to content

Commit

Permalink
fixed acidentally used case-sensitive pattern matching when accountin…
Browse files Browse the repository at this point in the history
…g number of user-started vacuums
  • Loading branch information
lesovsky committed May 24, 2019
1 parent e71ec38 commit bd9690e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/stat/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ SELECT
PgAutovacQueryDefault = `SELECT
count(*) FILTER (WHERE query ~* '^autovacuum:') AS av_workers,
count(*) FILTER (WHERE query ~* '^autovacuum:.*to prevent wraparound') AS av_wrap,
count(*) FILTER (WHERE query ~ '^vacuum' AND state != 'idle') AS v_manual,
count(*) FILTER (WHERE query ~* '^vacuum' AND state != 'idle') AS v_manual,
coalesce(date_trunc('seconds', max(now() - xact_start)), '00:00:00') AS av_maxtime
FROM pg_stat_activity
WHERE (query ~* '^autovacuum:' OR query ~* '^vacuum') AND pid <> pg_backend_pid()`
Expand Down

0 comments on commit bd9690e

Please sign in to comment.