From: Joe Conway <mail@joeconway.com>
To: Don Seiler <don@seiler.us>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Why is my table not autovacuuming?
Date: Mon, 28 Aug 2017 09:25:32 -0700
Message-ID: <f937001f-8848-f04e-b2a5-2cec58c340fc@joeconway.com> (raw)
In-Reply-To: <CAHJZqBDBYBoBRy1x-6-Y5NNcNaM6LKsjDD0bE8ewik3U+bev6g@mail.gmail.com>
References: <CAHJZqBAaXKi2+n4zNFYkjOCLY+ABpuC_BSMBKHfHfs0QqPNjbA@mail.gmail.com>
<ea2474b3-82d8-3eb1-e781-a1ac54c7e11a@joeconway.com>
<CAHJZqBDBYBoBRy1x-6-Y5NNcNaM6LKsjDD0bE8ewik3U+bev6g@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
Attachments:
signature.asc (application/pgp-signature, 818B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: mail@joeconway.com, don@seiler.us
Subject: Re: Why is my table not autovacuuming?
In-Reply-To: <f937001f-8848-f04e-b2a5-2cec58c340fc@joeconway.com>
References: <CAHJZqBAaXKi2+n4zNFYkjOCLY+ABpuC_BSMBKHfHfs0QqPNjbA@mail.gmail.com> <ea2474b3-82d8-3eb1-e781-a1ac54c7e11a@joeconway.com> <CAHJZqBDBYBoBRy1x-6-Y5NNcNaM6LKsjDD0bE8ewik3U+bev6g@mail.gmail.com> <f937001f-8848-f04e-b2a5-2cec58c340fc@joeconway.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox