Re: Trigger more frequent autovacuums of heavy insert tables

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: Melanie Plageman <melanieplageman@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-11-11T18:48:39Z
Lists: pgsql-hackers
On Mon, Mar 03, 2025 at 02:47:33PM -0500, Melanie Plageman wrote:
> cool, I've changed it to this, pushed, and marked the commitfest entry
> as committed.
> Thanks so much for your attention and review!

I think maintenance.sgml needs an update (specifically, the part about the
insert threshold [0]).

[0] https://www.postgresql.org/docs/devel/routine-vacuuming.html#AUTOVACUUM

-- 
nathan



Commits

  1. doc: Update formula for vacuum insert threshold.

  2. Redefine pg_class.reltuples to be -1 before the first VACUUM or ANALYZE.

  3. Measure the number of all-visible pages for use in index-only scan costing.