| From: | Sami Imseih <samimseih(at)gmail(dot)com> |
|---|---|
| To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
| Cc: | Greg Burd <greg(at)burd(dot)me>, David Rowley <dgrowleyml(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Robert Treat <rob(at)xzilla(dot)net>, Jeremy Schneider <schneider(at)ardentperf(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: another autovacuum scheduling thread |
| Date: | 2026-03-20 04:22:35 |
| Message-ID: | CAA5RZ0s7k6yve1Bq1OY+aXU3ifc_fvOiYkpE2VxwrUcHr2AtTg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> Done in the attached.
Thanks!
I have a few comments.
#1.
+ * between 0.0 and 1.0 (inclusive). Setting all of these to 0.0 restores
This should be "0.0 and 10.0"
#2.
typo:
+ * being scaling aggressively.
Thisshould be "begin"
#3.
This reads more like documentation than code comment.
+ * To adjust how strongly each component contributes to the score, the
+ * following parameters can be adjusted from their default of 1.0 to anywhere
+ * between 0.0 and 1.0 (inclusive). Setting all of these to 0.0 restores
+ * pre-v19 prioritization behavior:
+ *
+ * autovacuum_freeze_score_weight
+ * autovacuum_multixact_freeze_score_weight
+ * autovacuum_vacuum_score_weight
+ * autovacuum_vacuum_insert_score_weight
+ * autovacuum_analyze_score_weight
I don't actually think this section adds any value at all to the comments.
#4.
+ elog(DEBUG3, "%s: vac: %.0f (threshold %.0f),
ins: (disabled), anl: %.0f (threshold %.0f), score %.3f",
A missing colon after "score", unlike the other occurrence which has it.
#5.
+ if (autovacuum_freeze_score_weight > 1.0)
+ effective_xid_failsafe_age /=
autovacuum_freeze_score_weight;
+ if (autovacuum_multixact_freeze_score_weight > 1.0)
+ effective_mxid_failsafe_age /=
autovacuum_multixact_freeze_score_weight;
+
Shouldn't this be "if (autovacuum_freeze_score_weight > 0.0)" ?
A weight > 0 should always adjust the threshold, right? we should only
prevent division by 0 here.
--
Sami Imseih
Amazon Web Services (AWS)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Rowley | 2026-03-20 04:40:04 | Re: another autovacuum scheduling thread |
| Previous Message | Peter Smith | 2026-03-20 03:48:29 | Re: Fix how some lists are displayed by psql \d+ |