| From: | Melanie Plageman <melanieplageman(at)gmail(dot)com> |
|---|---|
| To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
| Cc: | Robert Treat <rob(at)xzilla(dot)net>, Greg Sabino Mullane <htamfids(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Peter Geoghegan <pg(at)bowt(dot)ie>, David Rowley <dgrowley(at)gmail(dot)com>, Corey Huinker <corey(dot)huinker(at)gmail(dot)com> |
| Subject: | Re: Trigger more frequent autovacuums of heavy insert tables |
| Date: | 2025-11-18 21:30:14 |
| Message-ID: | CAAKRu_bokTG-pnOfO8jEMEfL84YXeNZYOuGfmDCW1zrVs8k5wA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Nov 18, 2025 at 3:20 PM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>
> On Tue, Nov 11, 2025 at 12:48:39PM -0600, Nathan Bossart wrote:
> > I think maintenance.sgml needs an update (specifically, the part about the
> > insert threshold [0]).
>
> Here is a first try.
Thanks for catching this!
@@ -934,12 +934,16 @@ vacuum threshold = Minimum(vacuum max threshold,
vacuum base threshold + vacuum
The table is also vacuumed if the number of tuples inserted since the last
vacuum has exceeded the defined insert threshold, which is defined as:
<programlisting>
-vacuum insert threshold = vacuum base insert threshold + vacuum
insert scale factor * number of tuples
+vacuum insert threshold = vacuum base insert threshold + vacuum
insert scale factor * number of tuples * percent of table not frozen
I wish we could say "* number of unfrozen tuples". I know that's not
true because we don't know how many tuples are on each page, but the
formula feels a little overly detailed this way. Anyway, this is fine.
I didn't apply and render the whole thing, but the wording looks good
to me.
It's actually interesting that we calculate the thresholds in tuples
when vacuum operates per page. And the per tuple costs are not really
as big of a deal as the per page costs.
- Melanie
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Smith | 2025-11-18 21:34:23 | Re: DOCS: Missing <structfield> tags for some SEQUENCE fields |
| Previous Message | Tom Lane | 2025-11-18 21:18:38 | Re: Compile error on the aarch64 platform: Missing asm/hwcap.h |