Re: Are my autovacuum settings too aggressive for this table?

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Jason Ralph <jralph(at)affinitysolutions(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Are my autovacuum settings too aggressive for this table?
Date: 2019-11-01 19:45:15
Message-ID: CAHOFxGoZWDegktRRBdv9r9RQ6ufQZ1Dnj6bP+FPXzWC0Xs+kSA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

My thinking is opposite from what you have. I consider it important to very
aggressive on autovacuum because it only ever does the required amount of
work. If a tiny amount of work is needed, it does only that and is done.
Assuming it doesn't cause I/O concerns, do it as often as possible to
minimize the growth of bloat and maximize the reuse of the space already
allocated to that relation.

On the subject of analyze, the statistics are unlikely to be impacted
significantly by inserting about 24k rows to a table with almost 20 million
already. With default_statistics_target at 100, what are the chances those
new rows will even be included in the sample? I don't know the math, but
given each run of analyze does the same ALL the work each and every time it
runs, it seems prudent to do them a little less often than autovacuum
anyway. Regardless though, autoanalyze is a small amount of work that it
does each time.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jason Ralph 2019-11-01 20:05:01 RE: Are my autovacuum settings too aggressive for this table?
Previous Message Shatamjeev Dewan 2019-11-01 19:26:00 RE: Declarative Range Partitioning Postgres 11