Re: Trigger more frequent autovacuums of heavy insert tables
Melanie Plageman <melanieplageman@gmail.com>
From: Melanie Plageman <melanieplageman@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: 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-02-26T21:48:20Z
Lists: pgsql-hackers
Attachments
- v11-0002-Trigger-more-frequent-autovacuums-with-relallfro.patch (text/x-patch) patch v11-0002
- v11-0001-Add-relallfrozen-to-pg_class.patch (text/x-patch) patch v11-0001
On Wed, Feb 26, 2025 at 12:25 PM Nathan Bossart <nathandbossart@gmail.com> wrote: > > On Wed, Feb 26, 2025 at 11:17:06AM -0500, Robert Treat wrote: > > It strikes me as a bit odd to have this extra wording in the pg_class > > documentation: > > > > + Every all-frozen page must also be marked > > + all-visible in the visibility map, so > > + <structfield>relallfrozen</structfield> should be less than or equal to > > + <structfield>relallvisible</structfield>. However, if either field is > > + updated manually or if the visibility map is corrupted, it is possible > > + for <structfield>relallfrozen</structfield> to exceed > > + <structfield>relallvisible</structfield>. > > > > For example, we don't document that rellallvisible should never exceed > > relpages, and we aren't normally in the habit of documenting weird > > behavior that might happen if people go updating the system catalogs. > > Maybe it's just me, but when I read this earlier, I thought there > > might be some intended use case for updating the catalog manually that > > you had in mind and so the comments were warranted (and indeed, it's > > part of why I thought the warning would be useful for users). But upon > > reading the thread more and another pass through your updated patches, > > this doesn't seem to be the case, and I wonder if this language might > > be more encouraging of people updating catalogs than we would > > typically be. > > +1. If we did want to add more information about the ordinary expectations > of relallfrozen and friends here, I'd suggest doing so in a separate patch. > IMHO the usual "This is only an estimate..." wording is sufficient for the > introduction of relallfrozen. Makes sense. Thanks Robert and Nathan. Attached v11 changes the docs wording and is rebased. - Melanie
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