8000 doc: warn pg_stat_reset() can cause vacuum/analyze problems · postgres/postgres@5f93720 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 5f93720

Browse files
committed
1 parent e9377e3 commit 5f93720

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

doc/src/sgml/monitoring.sgml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3190,6 +3190,17 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
31903190
</tgroup>
31913191
</table>
31923192

3193+
<warning>
3194+
<para>
3195+
Using <function>pg_stat_reset()</function> also resets counters that
3196+
autovacuum uses to determine when to trigger a vacuum or an analyze.
3197+
Resetting these counters can cause autovacuum to not perform necessary
3198+
work, which can cause problems such as table bloat or out-dated
3199+
table statistics. A database-wide <command>ANALYZE</command> is
3200+
recommended after the statistics have been reset.
3201+
</para>
3202+
</warning>
3203+
31933204
<para>
31943205
<function>pg_stat_get_activity</function>, the underlying function of
31953206
the <structname>pg_stat_activity</structname> view, returns a set of records

0 commit comments

Comments
 (0)
0