title: Question regarding pg_stat_reset() in postgresql
body: <p>I have a question regarding function <code>pg_stat_reset();</code> I am trying to collect database table stats on regular basis and for that purpose i am using stats from various postgres tables like <code>pg_stat_all_tables, pg_stat_database</code>. But data in this table is accumulated over period of time. I am planning to reset it on daily basis. I just want to know if its safe to run this function on daily, hourly basis on production database. And also if safe are there any settings PG offer by which i can reset stats of regular interval, apart from setting cronjob and running <code>pg_stat_reset()</code></p>
  <p><a href="https://www.postgresql.org/docs/12/monitoring-stats.html" rel="nofollow noreferrer">https://www.postgresql.org/docs/12/monitoring-stats.html</a></p>