Re: [ADMIN] Why is my table not autovacuuming? - Mailing list pgsql-admin

From Joe Conway
Subject Re: [ADMIN] Why is my table not autovacuuming?
Date
Msg-id 73557173-6cdb-6318-c7a5-e531d385e397@joeconway.com
Whole thread Raw
In response to Re: [ADMIN] Why is my table not autovacuuming?  (Don Seiler <don@seiler.us>)
Responses Re: [ADMIN] Why is my table not autovacuuming?
List pgsql-admin
On 08/28/2017 08:59 AM, Don Seiler wrote:
> So the autovacuum daemon knows that there are 71M rows, even though
> pg_stat_all_tables said only 170K? Is it using pg_class.reltuples? Is
> pg_stat_all_tables not really a reliable source of stats information?

See:
file:///opt/src/pgsql-git/master/src/backend/postmaster/autovacuum.c

 * threshold = vac_base_thresh + vac_scale_factor * reltuples

pg_stat_all_tables only shows information known by the stats collector,
which only knows about activity since the last stats reset (which can
happen, for example on "immediate" shutdown or server crash), not
absolute numbers (although reltuples is only an estimate too).

--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development


Attachment

pgsql-admin by date:

Previous
From: Don Seiler
Date:
Subject: Re: [ADMIN] Why is my table not autovacuuming?
Next
From: Don Seiler
Date:
Subject: Re: [ADMIN] Why is my table not autovacuuming?