| From: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
|---|---|
| To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
| Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Robert Treat <rob(at)xzilla(dot)net>, David Rowley <dgrowleyml(at)gmail(dot)com>, Sami Imseih <samimseih(at)gmail(dot)com>, Jeremy Schneider <schneider(at)ardentperf(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: another autovacuum scheduling thread |
| Date: | 2025-11-22 13:07:36 |
| Message-ID: | CAFiTN-uk1Khy8FYkefHk2Txb4fNtUrvtaKBab=G9cSnE_VywFA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Nov 20, 2025 at 9:55 PM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>
Thanks for working on this problem, We frequently hear about the auto
vacuuming scheduling issue. I believe this is a great starting point
to prioritize based on the wraparound and vacuum threshold limit.
However, my vision for addressing this problem has always involved
maintaining two distinct priority queues (or sorted lists). Each of
these queues would contain tables, with the tables within each queue
sorted by their respective scores.
Queue 1: Wraparound-Critical: This queue contains tables that require
immediate action because their XID or MultiXact ID age is critical,
especially those approaching the failsafe limit.
Queue 2: Threshold-Based: This queue includes tables needing VACUUM
due to crossing other thresholds.
Both queues would be maintained as sorted lists, with the highest
priority score at the head. The autovacuum worker dynamically selects
tables for processing from the head of these 2 queues. For instance,
if a table is initially chosen from the threshold queue but processing
took too long, and another table approaches its failsafe limit due to
a high rate of concurrent XID generation, the latter can be
prioritized from the wraparound queue. I believe this 2 queue
approach offers more flexibility than attempting to merge these
distinct concerns into a single scoring dimension.
Tables may exist in both queues. If a table is selected and vacuumed,
it will be removed from both queues to prevent redundant efforts.
--
Regards,
Dilip Kumar
Google
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Álvaro Herrera | 2025-11-22 13:11:56 | Re: change default default_toast_compression to lz4? |
| Previous Message | Álvaro Herrera | 2025-11-22 13:00:55 | Re: Extended test coverage and docs for SSL passphrase commands |