Re: Why is my table not autovacuuming?

From: Joe Conway <mail(at)joeconway(dot)com>
To: Don Seiler <don(at)seiler(dot)us>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Why is my table not autovacuuming?
Date: 2017-08-28 16:25:32
Message-ID: f937001f-8848-f04e-b2a5-2cec58c340fc@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Don Seiler 2017-08-28 16:31:28 Re: Why is my table not autovacuuming?
Previous Message Don Seiler 2017-08-28 16:16:30 Re: Why is my table not autovacuuming?