Re: [ADMIN] Is it safe to run pg_stat_reset() i Prod? - Mailing list pgsql-admin

From Shreeyansh Dba
Subject Re: [ADMIN] Is it safe to run pg_stat_reset() i Prod?
Date
Msg-id CAGDYbUO1E_og5pseHcANeFO9oEZ0pRGh+vN05Yp+q5bphuEzXQ@mail.gmail.com
Whole thread Raw
In response to [ADMIN] Is it safe to run pg_stat_reset() i Prod?  (Gustav Karlsson <gustav.karlsson@bekk.no>)
List pgsql-admin
Hi Gustav Karlsson,

It only resets the stats for the current database, not the cluster wide stats - pg_database is cluster wide.

Specially when values associated to inserts, updates, deleted, etc. In pg_stat_user_* get a new value after running pg_stat_reset().




On Mon, Dec 17, 2018 at 5:11 PM Gustav Karlsson <gustav.karlsson@bekk.no> wrote:
Hi,

Am tracking unused indices and wondering if it is safe to run pg_stat_reset() i production? I.e. will pg_stat_reset() affect stats used by the query planner in any way which could affect performance?

Regards,
Gustav


pgsql-admin by date:

Previous
From: Gustav Karlsson
Date:
Subject: [ADMIN] Is it safe to run pg_stat_reset() i Prod?
Next
From: Tom Lane
Date:
Subject: Re: [ADMIN] Is it safe to run pg_stat_reset() i Prod?