Re: Are my autovacuum settings too aggressive for this table? - Mailing list pgsql-general

From Michael Lewis
Subject Re: Are my autovacuum settings too aggressive for this table?
Date
Msg-id CAHOFxGoZWDegktRRBdv9r9RQ6ufQZ1Dnj6bP+FPXzWC0Xs+kSA@mail.gmail.com
Whole thread Raw
In response to Are my autovacuum settings too aggressive for this table?  (Jason Ralph <jralph@affinitysolutions.com>)
List 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.

pgsql-general by date:

Previous
From: Shatamjeev Dewan
Date:
Subject: RE: Declarative Range Partitioning Postgres 11
Next
From: Jason Ralph
Date:
Subject: RE: Are my autovacuum settings too aggressive for this table?