April 2018
Intermediate to advanced
508 pages
15h 22m
English
Starting from PostgreSQL 9.0, it's also possible to reset the pg_stat_bgwriter view using the following command:
$ psql -c "select pg_stat_reset_shared('bgwriter');"
But this will never cause heavy statistics overload as it's not stored in a file that will get large. It's also possible to reset single statistics values in 9.0 using pg_stat_reset_single_table_counters and function stats with pg_stat_reset_single_function_counters, but if your issue is high statistics collector overhead, you should really reset the whole thing, instead.
Read now
Unlock full access