Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rvjJB-00DwmX-7g for pgsql-hackers@arkaria.postgresql.org; Sat, 13 Apr 2024 19:45:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rvjJ8-005PYQ-L7 for pgsql-hackers@arkaria.postgresql.org; Sat, 13 Apr 2024 19:45:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rvjJ8-005PYH-9I for pgsql-hackers@lists.postgresql.org; Sat, 13 Apr 2024 19:45:02 +0000 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rvjJ0-000mOi-JK for pgsql-hackers@postgresql.org; Sat, 13 Apr 2024 19:45:01 +0000 Received: by mail-io1-xd30.google.com with SMTP id ca18e2360f4ac-7d5db134badso79964239f.2 for ; Sat, 13 Apr 2024 12:44:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713037492; x=1713642292; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=DimJ6KFCW2eKfvG9XmCm5vDAMCCSqAIkKo1axTMgt/Q=; b=GUkeBKYipug120LzWOElWJclR5nJ+0rZNLL5uoGwb62wCbNLAzUoy6MGAaOZOY407c FHb4APi/iKeayF4k1KMOPzH8Wo+sCKMNaycMz4u+tCuBCdnnptxjgyQvCVPRYjLJMpEr DkQWpxgoH/mbfb7OxstVZ/HZ/dZ5FsXPRu9JG6/UG3toJGq2dyps6snomYxRwgnLremS b8kf7U+bcxqfznS/hvUz23fgyxqQ1vWTZ9tKIM9yDrdoCmx3y0HQ1dFTnpcLJgPWHqO4 xCL1ZtlZtwcR4agEJwPe4lglJ5PfVh3BgouWLUMN92+HE9NPZrH/Ma7VlZm/wo0/M265 mkXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713037492; x=1713642292; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=DimJ6KFCW2eKfvG9XmCm5vDAMCCSqAIkKo1axTMgt/Q=; b=I3PwC/6o81x56P7FRbqKiIipIBKBmpgZz2Fdpl48XNhvxDg5q7Dsc65v9Jz0IJ2Xb4 FPUH6HfkqnhMQCL/2pzcmCHp3zKJAFsz+iYZEqGZliCG4d9ESfQ+CP7q+NXr0Lth7KZX zt8yT2+AXGf6Y/woXrbBO23ZuT8l7UOcWyRVMdF4JHUi0BFCp94yBO7305ypLrIB06uu 5Bm7/A5BJ/c4SOLR0I0nuuihtX6+VlT0qWETKjvEyNBr3ck5/90Oya/REwue7SvPgSUK +GDoi+ulw+3zoL47T45E8v+V4s+U/CO+RpHUGT8NyAT+bOvHGhxJUDZS1SN1KfZz1tpj G4VA== X-Gm-Message-State: AOJu0YzEz82mLwmW7conADlSjUzpTRbmMbZOs9MnvQ6V4tWp8lLgQlrB 39zhk+2JXKAXPzwHvpi7JNQRWzJanQ4E1hGbZhjImsgmjtULvT9Q X-Google-Smtp-Source: AGHT+IGmehYBWjarAefhy9TPExd8efUTCsmTG+BWjNC2IUAAxexEg9Wfcf1+f94bf/3hr4dsDTAAuQ== X-Received: by 2002:a05:6602:2cd6:b0:7d3:4ef3:e6c1 with SMTP id j22-20020a0566022cd600b007d34ef3e6c1mr7661614iow.10.1713037492377; Sat, 13 Apr 2024 12:44:52 -0700 (PDT) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id w21-20020a056638379500b00482ed03181asm588641jal.144.2024.04.13.12.44.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 12:44:51 -0700 (PDT) Date: Sat, 13 Apr 2024 14:44:50 -0500 From: Nathan Bossart To: "Imseih (AWS), Sami" Cc: "pgsql-hackers@postgresql.org" Subject: Re: allow changing autovacuum_max_workers without restarting Message-ID: <20240413194450.GA2537802@nathanxps13> References: <20240410212344.GA1824549@nathanxps13> <20240411144240.GD1882158@nathanxps13> <66B70E79-54C0-4E58-831D-502B4B97E33D@amazon.com> <20240411192423.GB2005410@nathanxps13> <20240412184000.GA2416270@nathanxps13> <9CD7B92C-3330-4E79-A84E-95E99B1FD926@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9CD7B92C-3330-4E79-A84E-95E99B1FD926@amazon.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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