statistics for shared catalogs not updated when autovacuum is off

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: statistics for shared catalogs not updated when autovacuum is off
Date: 2016-01-30 23:05:16
Message-ID: 56AD41AC.1030509@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

When autovacuum is off, the statistics in pg_stat_sys_tables for shared
catalogs (e.g., pg_authid, pg_database) never update. So seq_scan
doesn't update when you read the table, last_analyze doesn't update when
you run analyze, etc.

But when you shut down the server and restart it with autovacuum on, the
updated statistics magically appear right away. So seq_scan is updated
with the number of reads you did before the shutdown, last_analyze
updates with the time of the analyze you did before the shutdown, etc.
So the data is saved, just not propagated to the view properly.

I can reproduce this back to 9.3, but not 9.2. Any ideas?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2016-01-31 03:55:10 Re: RFC: replace pg_stat_activity.waiting with something more descriptive
Previous Message Michael Paquier 2016-01-30 22:55:26 Re: Additional role attributes && superuser review