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 f937001f-8848-f04e-b2a5-2cec58c340fc@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 09:12 AM, Don Seiler wrote:
> Same concerns as Phil's reply. Are the numbers in pg_stat_all_tables not
> part of what autovacuum looks at? I assume those numbers would be
> updated by autoanalyze but if that only kicks in at 10% scale factor
> then that wouldn't happen for a while either? Seems like there's a huge
> disconnect here, or I just don't have my head around this properly. Or both.

Well some values are maintained by analyze, but with a 0.1 scale factor
for analyze that still means 7 million rows or so threshold for that to
happen. E.g. see:

src/backend/commands/analyze.c
-------
/*
 * Report ANALYZE to the stats collector, too.  However, if doing
 * inherited stats we shouldn't report, because the stats collector only
 * tracks per-table stats.  Reset the changes_since_analyze counter only
 * if we analyzed all columns; otherwise, there is still work for
 * auto-analyze to do.
 */
-------

Joe

--
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?