Re: Trigger more frequent autovacuums of heavy insert tables
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: wenhui qiu <qiuwenhuifx@gmail.com>
Cc: Melanie Plageman <melanieplageman@gmail.com>, Robert Treat <rob@xzilla.net>, Greg Sabino Mullane <htamfids@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>, Andres Freund <andres@anarazel.de>, Peter Geoghegan <pg@bowt.ie>, David Rowley <dgrowley@gmail.com>, Corey Huinker <corey.huinker@gmail.com>
Date: 2025-03-01T17:50:56Z
Lists: pgsql-hackers
On Sat, Mar 01, 2025 at 08:57:52AM +0800, wenhui qiu wrote: > Based on the comments, the pcnt_unfrozen value could potentially be 0, > which would indicate that everything is frozen. Therefore, is it necessary > to handle the case where the value is 0.? How so? If it's 0, then the insert threshold calculation would produce autovacuum_vacuum_insert_threshold, just like for an empty table. That seems like the intended behavior to me. -- nathan
Commits
-
doc: Update formula for vacuum insert threshold.
- cbdce71b9984 19 (unreleased) landed
- c99436f43322 18.2 landed
-
Redefine pg_class.reltuples to be -1 before the first VACUUM or ANALYZE.
- 3d351d916b20 14.0 cited
-
Measure the number of all-visible pages for use in index-only scan costing.
- e6858e665731 9.2.0 cited