Skip to content

Commit

Permalink
exclude (auto)vac tasks accounting from xact_maxtime
Browse files Browse the repository at this point in the history
  • Loading branch information
lesovsky committed Oct 1, 2016
1 parent 3217176 commit e97d792
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/Changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pgcenter (devel) unstable; urgency=low

* exclude (auto)vacuum tasks accounting in xact_maxtime field.
* fix runglish, typos and cosmetic changes.
* change long queries min age from 500ms to 0ms.
* replace min() and max() functions with macros.
Expand Down
3 changes: 2 additions & 1 deletion pgcenter.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,8 @@ struct colAttrs {
#define PG_STAT_STATEMENTS_SYS_QUERY \
"SELECT (sum(total_time) / sum(calls))::numeric(6,3) AS avg_query, sum(calls) AS total_calls FROM pg_stat_statements"
#define PG_STAT_ACTIVITY_SYS_QUERY \
"SELECT coalesce(date_trunc('seconds', max(now() - xact_start)), '00:00:00') FROM pg_stat_activity"
"SELECT coalesce(date_trunc('seconds', max(now() - xact_start)), '00:00:00') FROM pg_stat_activity \
WHERE (query !~* '^autovacuum:' AND query !~* '^vacuum') AND pid <> pg_backend_pid()"

/* context queries */
#define PG_STAT_DATABASE_91_QUERY \
Expand Down

0 comments on commit e97d792

Please sign in to comment.