Re: allow changing autovacuum_max_workers without restarting

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: "Imseih (AWS), Sami" <simseih(at)amazon(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: allow changing autovacuum_max_workers without restarting
Date: 2024-04-19 15:43:22
Message-ID: 20240419154322.GA3988554@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 18, 2024 at 05:05:03AM +0000, Imseih (AWS), Sami wrote:
> I looked at the patch set. With the help of DEBUG2 output, I tested to ensure
> that the the autovacuum_cost_limit balance adjusts correctly when the
> autovacuum_max_workers value increases/decreases. I did not think the
> patch will break this behavior, but it's important to verify this.

Great.

> 1. A nit. There should be a tab here.
>
> - dlist_head av_freeWorkers;
> + dclist_head av_freeWorkers;

I dare not argue with pgindent.

> 2. autovacuum_max_worker_slots documentation:
>
> + <para>
> + Note that the value of <xref linkend="guc-autovacuum-max-workers"/> is
> + silently capped to this value.
> + </para>
>
> This comment looks redundant in the docs, since the entry
> for autovacuum_max_workers that follows mentions the
> same.

Removed in v2. I also noticed that I forgot to update the part about when
autovacuum_max_workers can be changed. *facepalm*

> 3. The docs for autovacuum_max_workers should mention that when
> the value changes, consider adjusting the autovacuum_cost_limit/cost_delay.
>
> This is not something new. Even in the current state, users should think about
> these settings. However, it seems even important if this value is to be
> dynamically adjusted.

I don't necessarily disagree that it might be worth mentioning these
parameters, but I would argue that this should be proposed in a separate
thread.

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v2-0001-Rename-autovacuum_max_workers-to-autovacuum_max_w.patch text/x-diff 17.1 KB
v2-0002-Convert-autovacuum-s-free-workers-list-to-a-dclis.patch text/x-diff 3.8 KB
v2-0003-Move-free-autovacuum-worker-checks-to-a-helper-fu.patch text/x-diff 2.2 KB
v2-0004-Reintroduce-autovacuum_max_workers-as-a-PGC_SIGHU.patch text/x-diff 8.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Japin Li 2024-04-19 15:46:10 Support event trigger for logoff
Previous Message Tom Lane 2024-04-19 15:21:05 Re: ECPG cleanup and fix for clang compile-time problem