agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Imseih (AWS), Sami <simseih@amazon.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: allow changing autovacuum_max_workers without restarting
Date: Sat, 13 Apr 2024 14:44:50 -0500
Message-ID: <20240413194450.GA2537802@nathanxps13> (raw)
In-Reply-To: <9CD7B92C-3330-4E79-A84E-95E99B1FD926@amazon.com>
References: <20240410212344.GA1824549@nathanxps13>
	<D04DFE2E-290F-43BA-9368-952F2B85E0C2@amazon.com>
	<20240411144240.GD1882158@nathanxps13>
	<66B70E79-54C0-4E58-831D-502B4B97E33D@amazon.com>
	<20240411192423.GB2005410@nathanxps13>
	<DC833F51-881A-47F9-AEF6-B2E1DE46CDC8@amazon.com>
	<20240412184000.GA2416270@nathanxps13>
	<9CD7B92C-3330-4E79-A84E-95E99B1FD926@amazon.com>

On Fri, Apr 12, 2024 at 10:17:44PM +0000, Imseih (AWS), Sami wrote:
>>> Hm. Maybe the autovacuum launcher could do that.
> 
> Would it be better to use a GUC check_hook that compares the 
> new value with the max allowed values and emits a WARNING ?
> 
> autovacuum_max_workers already has a check_autovacuum_max_workers
> check_hook, which can be repurposed for this.
> 
> In the POC patch, this check_hook is kept as-is, which will no longer make sense.

IIRC using GUC hooks to handle dependencies like this is generally frowned
upon because it tends to not work very well [0].  We could probably get it
to work for this particular case, but IMHO we should still try to avoid
this approach.  I didn't find any similar warnings for other GUCs like
max_parallel_workers_per_gather, so it might not be crucial to emit a
WARNING here.

[0] https://postgr.es/m/27574.1581015893%40sss.pgh.pa.us

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





view thread (71+ messages)  latest in thread

Message-ID: <20240413194450.GA2537802@nathanxps13>
Permalink:  ../20240413194450.GA2537802@nathanxps13/
Also on:    postgresql.org/message-id/20240413194450.GA2537802@nathanxps13

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, simseih@amazon.com
  Subject: Re: allow changing autovacuum_max_workers without restarting
  In-Reply-To: <20240413194450.GA2537802@nathanxps13>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox