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 1u9oyQ-006gyP-QB for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Apr 2025 17:42:27 +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 1u9oyN-0094vN-LE for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Apr 2025 17:42:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u9oyN-0094uQ-Bl for pgsql-hackers@lists.postgresql.org; Tue, 29 Apr 2025 17:42:24 +0000 Received: from mail-io1-xd2a.google.com ([2607:f8b0:4864:20::d2a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u9oyM-000DJT-0T for pgsql-hackers@lists.postgresql.org; Tue, 29 Apr 2025 17:42:23 +0000 Received: by mail-io1-xd2a.google.com with SMTP id ca18e2360f4ac-85b3f92c866so131310039f.3 for ; Tue, 29 Apr 2025 10:42:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745948541; x=1746553341; darn=lists.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=6PSwffPHNS6igCe9Pgf3WaedLsTu71ye8Qiha9hvAy0=; b=iAj5Vu1hkzUqP4kF6RfZPFMo17xT+W3ZUHy93ilIpdT3CdlbsiDhDqvUCFVXc7Qhqn VkN74F5QUSKrnNWkv4n24TfRlzaKBkRCldoUL9jk6Fu4pVB4Xva8kpj+f/WQugWNsKFL 90bxUJlR9jJx5r/603A9fe3j8wXX/twktOc/9666LltdB76yC9QWGc11XpcAc2sX9i6h nVYzCpvFURUmMJdbN+qwJxhfdzJAP1XPjyuM/vLx4R+X6a6q2lor/0RdSlP3th1WuSGA 8GwnRKow2ZuEtTmU2mKHGYIUcXGOdv//y1Fuwzbu9kCIJXVhAZoLFuwzfBinsHsAyor0 6idg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745948541; x=1746553341; 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=6PSwffPHNS6igCe9Pgf3WaedLsTu71ye8Qiha9hvAy0=; b=oAKidmOcwzMAjL9cwcHQqTEHgazOqpeRjF7TkPSCbh1H8xVTj+vYZxZQe6NCEAFEst TvKYderqp28hem3WxIydxZjCIT8ymxeuv9MoGayO5PFyDqpKqYs4hhDqM8mIpMv4q0Su JGYm8/QLXYYTxLFyprvncpVXRiXPLNqX8CKQ1yhxLujUz0Q0NDlLJH9+oAW8ZeUGVOu5 quq71XFtFCAVn5Ui7CcQO8KqVWkspmmTkGbOWkW9aexEfYKCFUwNXPougWmQNQFOOt4u qk44K5HeRwET9gwm3NPN2fQALliYgERW+Vcn5xIwwlZFaFjbCb0BRxAdZJgBQ4YeoHdR 4Bqg== X-Forwarded-Encrypted: i=1; AJvYcCWpYypez3xIE7dUwIBygIMtxS0G5uA7e6exOH+ugKgj/4/h6jaE+az5OZo0qEsk3uja4ovaNPYHTYPO8O0/@lists.postgresql.org X-Gm-Message-State: AOJu0YxHzduJjxgcpwVgAWfw8NUyDHwcfsEk4RG0X6l6wLWBA0F8JXCw KUCHQ6WS0WcgyRqqxnE+pq9lxltCopsBv73zxRJ54X3/vwa+ctrA X-Gm-Gg: ASbGncuCDR0K1r8XpSRyy2tMpN8GDKrjf+P7hNDvxnIwfULDmTC/MGFO/C4FWrWk+KP +sArXECjKkO08mAR9hkkZuG4YqprdLRejf+ayGtsihuUyh9kx3d1X3fAmZYy3EQVvapWlrAMWn9 EWBtBp00D0ab3NeusQApZWL5vH1mkUYXtPHr7Ct0F7NFefGS3Xu6CeYGxC6g6PEWsv6hbAYn2Yz B1MGuO2MQQDPrBFU20LjVEvWchxkphMfIOTjucaN8o2DRT/or4vn7Ss3TKfVpw9mjF+BciGvA3s QLhUCBwBvlADAGdv6y1+5mdQUq5yYfztB+VpVSFU2IJU6mVNULT7VGae2yHp3XwNWAOc1XubNNh uJrtGNQkqay7GjNbpHFugejulZavMLVI1yso0sk9JTA== X-Google-Smtp-Source: AGHT+IHIjWncOV32atIPyV4pCc19BRQ39jFVUwGJVl/zqwz7970W9CEItEji4vvdUdl5g6FbYKKoog== X-Received: by 2002:a05:6602:3945:b0:85b:3885:159e with SMTP id ca18e2360f4ac-86495e1fc7amr31131139f.3.1745948541672; Tue, 29 Apr 2025 10:42:21 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id ca18e2360f4ac-8648c1d91f5sm35600739f.41.2025.04.29.10.42.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Apr 2025 10:42:21 -0700 (PDT) Date: Tue, 29 Apr 2025 12:42:19 -0500 From: Nathan Bossart To: Tom Lane Cc: Peter Eisentraut , Andres Freund , pgsql-hackers@lists.postgresql.org, "Imseih (AWS), Sami" , Justin Pryzby , "pgsql-hackers@postgresql.org" Subject: Re: allow changing autovacuum_max_workers without restarting Message-ID: References: <1359669.1736206603@sss.pgh.pa.us> <1386858.1736220547@sss.pgh.pa.us> <713236.1745846094@sss.pgh.pa.us> <15005c8c-7676-43b7-a440-787b101cfdf5@eisentraut.org> <1050120.1745947158@sss.pgh.pa.us> <1052019.1745947915@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1052019.1745947915@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Apr 29, 2025 at 01:31:55PM -0400, Tom Lane wrote: > I wrote: >> Andres seemed lukewarm about reverting 38da05346 or 6d0154196, so >> I left it be for the moment. But I still feel the argument is good >> that "these will do little except confuse future hackers". Barring >> objection, I'll go revert them. > > Actually ... on looking again at 6d0154196 ("Lower default value of > autovacuum_worker_slots in initdb as needed"), it doesn't look that > silly. If we're unable to allocate max_connections = 100, turning > it down while still insisting on 16 AV worker slots doesn't seem > terribly sane. Maybe we'd choose a formula other than > "(max_connections / 6)" if we were doing it afresh, but not scaling > autovacuum_worker_slots at all doesn't seem like the best answer. Fair point. > So now I'm inclined to leave that one alone. I'd still revert > 38da05346, which means the comment added by 6d0154196 needs some minor > adjustments. But I think we can stick with the "(max_connections / > 6)" formula --- it will produce 3 with trial_conns = 20, but that's > enough. Yup, as long as the lowest possible default is >= the default for autovacuum_max_workers (3), we're good. -- nathan