[Patch] Add a reset_computed_values function in pg_stat_statements

From: Pierre Ducroquet <p(dot)psql(at)pinaraf(dot)info>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [Patch] Add a reset_computed_values function in pg_stat_statements
Date: 2019-09-01 09:04:36
Message-ID: 1762890.8ARNpCrDLI@peanuts2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


pg_stat_statements is a great tool to track performance issue in live
databases, especially when adding interfaces like PoWA on top of it.
But so far, tools like PoWA can not track the min_time, max_time, mean_time
and sum_var_time of queries : these statistics are cumulated over time,
fetching points in time would be of little to no use, especially when looking
at the impact of a DDL change.
This patch thus introduces a simple pg_stat_statements_reset_computed_values
function that reset the computed statistics, leaving all other information
alive, thus allowing the aforementioned scenario.


Pierre Ducroquet

Attachment Content-Type Size
0001-Add-a-function-to-reset-the-cumulative-statistics.patch text/x-patch 5.4 KB


Browse pgsql-hackers by date

  From Date Subject
Next Message Erik Rijkers 2019-09-01 09:09:11 Re: row filtering for logical replication
Previous Message Alexander Korotkov 2019-09-01 08:07:31 Write visibility map during CLUSTER/VACUUM FULL