Re: another autovacuum scheduling thread

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Jim Nasby <jnasby(at)upgrade(dot)com>, Sami Imseih <samimseih(at)gmail(dot)com>, Greg Burd <greg(at)burd(dot)me>, 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-26 21:29:47
Message-ID: CAApHDvrUQPZcjQK7+PAcXoXc664AizDiBY4thBh1kqEHUouPPQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 27 Mar 2026 at 05:49, Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>
> On Thu, Mar 26, 2026 at 01:28:16PM +1300, David Rowley wrote:
> > A review:
>
> Thanks. I believe I've addressed all your feedback.

It might just be a personal taste thing, but I'd have done the
following differently:

+ if (autovacuum_freeze_score_weight != 0.0 ||
+ autovacuum_multixact_freeze_score_weight != 0.0 ||
+ autovacuum_vacuum_score_weight != 0.0 ||
+ autovacuum_vacuum_insert_score_weight != 0.0 ||
+ autovacuum_analyze_score_weight != 0.0)
+ list_sort(tables_to_process, TableToProcessComparator);

I'd have done:

+ table->score = scores.max;
+ sort_required |= (scores.max != 0.0);
+ tables_to_process = lappend(tables_to_process, table);

...

if (sort_required)
list_sort(tables_to_process, TableToProcessComparator);

But, I'm fine if you'd rather keep it the way you have it.

No further comments at this stage.

Thanks for working on this.

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Melanie Plageman 2026-03-26 21:43:17 Re: Don't synchronously wait for already-in-progress IO in read stream
Previous Message Nathan Bossart 2026-03-26 21:23:48 Re: Speed up COPY TO text/CSV parsing using SIMD