Re: Berserk Autovacuum (let's save next Mandrill)
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: David Rowley <dgrowleyml@gmail.com>, Tomas Vondra <tomas.vondra@2ndquadrant.com>, Amit Kapila <amit.kapila16@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, Darafei Komяpa Praliaskouski <me@komzpa.net>, Andres Freund <andres@anarazel.de>, pgsql-hackers@lists.postgresql.org, Alvaro Herrera <alvherre@2ndquadrant.com>, Michael Banck <mbanck@gmx.net>
Date: 2020-03-16T04:34:25Z
Lists: pgsql-hackers
On Fri, Mar 13, 2020 at 10:48:27PM +0100, Laurenz Albe wrote: > On Fri, 2020-03-13 at 13:44 -0500, Justin Pryzby wrote: > > Possible it would be better to run VACUUM *without* freeze_min_age=0 ? (I get > > confused and have to spend 20min re-reading the vacuum GUC docs every time I > > deal with this stuff, so maybe I'm off). > > > > As I understand, the initial motivation of this patch was to avoid disruptive > > anti-wraparound vacuums on insert-only table. But if vacuum were triggered at > > all, it would freeze the oldest tuples, which is all that's needed; especially > > since fd31cd2651 "Don't vacuum all-frozen pages.", those pages would never need > > to be vacuumed again. Recently written tuples wouldn't be frozen, which is ok, > > they're handled next time. > > Freezing tuples too early is wasteful if the tuples get updated or deleted > soon after, but based on the assumption that an autovacuum triggered by insert > is dealing with an insert-mostly table, it is not that wasteful. You're right that it's not *that* wasteful. If it's a table that gets 90% inserts/10% updates, then only 10% of its tuples will be frozen. In the worst case, it's the same tuples every time, and that's somewhat wasteful. In the best case, those tuples are clustered on a small number of pages. -- Justin
Commits
-
Further improve stability fix for partition_aggregate test.
- 18d85e9b8a2b 13.0 landed
-
Improve stability fix for partition_aggregate test.
- 7cb0a423f914 13.0 landed
-
Attempt to stabilize partitionwise_aggregate test
- cefb82d49e21 13.0 landed
-
Fix race condition in statext_store().
- fe3036527a1f 13.0 landed
- 6c426cd43790 12.3 landed
-
Attempt to fix unstable regression tests, take 2
- 24566b359d09 13.0 landed
-
Attempt to fix unstable regression tests
- 2dc16efedc76 13.0 landed
-
Trigger autovacuum based on number of INSERTs
- b07642dbcd8d 13.0 landed
-
Fix upper limit for vacuum_cleanup_index_scale_factor
- 4d54543efa5e 11.0 cited