Re: Berserk Autovacuum (let's save next Mandrill)
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>, Andres Freund <andres@anarazel.de>, Masahiko Sawada <masahiko.sawada@2ndquadrant.com>, 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>, pgsql-hackers@lists.postgresql.org, Michael Banck <mbanck@gmx.net>
Date: 2020-03-25T16:05:21Z
Lists: pgsql-hackers
On Wed, Mar 25, 2020 at 12:46:52PM -0300, Alvaro Herrera wrote: > On 2020-Mar-25, Justin Pryzby wrote: > > > Maybe in the docs you can write this with thousands separators: 10,000,000 > > > > It looks like the GUC uses scale factor max=1e10, but the relopt is still > > max=100, which means it's less possible to disable for a single rel. > > I have paid no attention to this thread, but how does it make sense to > have a scale factor to be higher than 100? Surely you mean the > threshold value that should be set to ten million, not the scale factor? We went over this here: https://www.postgresql.org/message-id/20200317195616.GZ26184%40telsasoft.com ... https://www.postgresql.org/message-id/20200317213426.GB26184%40telsasoft.com The scale factor is relative to the reltuples estimate, which comes from vacuum (which presently doesn't run against insert-only tables, and what we're trying to schedule), or analyze, which probably runs adequately, but might be disabled or run too infrequently. Since we talked about how scale_factor can be used to effectively disable this new feature, I thought that scale=100 was too small and suggesed 1e10 (same as max for vacuum_cleanup_index_scale_factor since 4d54543ef). That should allow handling the case that analyze is disabled, or its threshold is high, or it hasn't run yet, or it's running but hasn't finished, or analyze is triggered as same time as vacuum. A table with 1e7 tuples (threshold) into which one inserts 1e9 tuples would hit scale_factor=100 threshold, which means scale_factor failed to "disable" the feature, as claimed. If anything, I think it may need to be larger... -- 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