Add command to reset stats
wuputah opened this issue · 5 comments
Create a wrapper for SELECT pg_stat_statements_reset();
e.g. heroku pg:stats-reset
.
As for the command name, try to avoid people running heroku pg:reset
to do this and accidentally deleting all their data.
I believe this was discussed in the past and decided against. IIRC, the consensus was that while restating the statistics can be useful, those situations are few and far between, and this should not be done casually.
+cc @brettgoulder
@catsby This is not the same as pg_stat_reset()
which we have been not excited about.
SELECT pg_stat_statements_reset();
on the other hand is currently runnable from pg:psql
on any db. I just ran it on my own db and it worked well to reset the pg_stat_statement
table. This endpoint would be a more surface-able implementation to let people know they can do it at all.
@gregburek ah, excellent :)
i did this in the last thing i did and it's done so