Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pk9c1-0003Us-St for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Apr 2023 20:20:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pk9c0-0005h0-SM for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Apr 2023 20:20:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pk9c0-0005gr-J0 for pgsql-hackers@lists.postgresql.org; Wed, 05 Apr 2023 20:20:08 +0000 Received: from mail-ua1-x930.google.com ([2607:f8b0:4864:20::930]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pk9by-000070-Ei for pgsql-hackers@postgresql.org; Wed, 05 Apr 2023 20:20:07 +0000 Received: by mail-ua1-x930.google.com with SMTP id p91so9299679uap.1 for ; Wed, 05 Apr 2023 13:20:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bowt-ie.20210112.gappssmtp.com; s=20210112; t=1680726005; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=hBw/G28/rQY22W6P2aITjfaBwVYw2aaXDuuNDilns08=; b=rAQ/VDcCCmuLGTAyLpS0C3NuALkvg69tmzXiAJverj0ul97s/PjFNOYfzWhlZiF6Wi e6FP8Lt4Lwk3+A5alJmyRgJyEIoxbq5afwaHy8RBdiYLLSG8O3/YXTiGNUT39/BbabUj 5DBErKD2frdX2it92ZY1IvsyIyhAD2UAi6Fykx2tTPOeieIWnHhkxaRQyNMfPjrJ0zVC 9mdgJeIC9uWfYlW040sMX2GTvKqg6LlXA2xiSxUObuX2EfeM55wywUiK5bn5CiCgKOZu g2xjUrbjqkuka0CTGlPqORvH5xGj5l2jZb8SfZXm3mdW74OIid5vc2TlGPr9cFVD9ryG EfqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680726005; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hBw/G28/rQY22W6P2aITjfaBwVYw2aaXDuuNDilns08=; b=ApLbp+aEYFc9nnplAOxUCGhl9qIG8uHJew2noI6MegGdJgDVie4nhBnZ/qNLeI0bGD WtTlOdCaoYGwj2fYR6BMwozsKFeYkqVyxDZ67S4eR+rJmmrNE/rvcbf2GoIbtSd6veaA kLMtkfQsq6de0vAg8azki3fAUkdS6q+m+u7d458SEbu8xi5M8BMIv414yeBZGlJWhnkj R9baDpinqua0fTcbS5Ky8KS8m//7u+ty0nsuTJCHTlM4D/F9wBuZVhfxZS272WMsmInE guOz8dZLkKCRlFj6VItgBwsqIblrl8Vks7XQXk8kKZMI7qTAkWp2B+lUv6mNWYt9+khI LvdA== X-Gm-Message-State: AAQBX9cuNPyQQURmk80DKVedyDtgndMGiJAzTVrQnnEwBA3iP7O/yw4s 03pg22nyC2C/kZVB2EDtryrc7zjs/cbaPOO4ePkHqg== X-Google-Smtp-Source: AKy350ajkJYoDmMsxT7QUz2L9Q2uh3avIXiwp42sBGtW86PdsxhgIcZRMg0gSH3e0PV5hNNN4QPc012xQiSpGgVqO1c= X-Received: by 2002:a1f:90c9:0:b0:43c:6ef1:7116 with SMTP id s192-20020a1f90c9000000b0043c6ef17116mr5781059vkd.0.1680726005482; Wed, 05 Apr 2023 13:20:05 -0700 (PDT) MIME-Version: 1.0 References: <20230329.132155.629765142788133576.horikyota.ntt@gmail.com> <20230329.173456.1185961934810139447.horikyota.ntt@gmail.com> <935191FB-083B-4060-89FC-466F61FAA391@yesql.se> <1252075.1680547394@sss.pgh.pa.us> <20230403190837.qubpnwugfe2k2g46@awork3.anarazel.de> <7E06F879-7E20-4A6A-862F-CA72CDC9A323@yesql.se> In-Reply-To: From: Peter Geoghegan Date: Wed, 5 Apr 2023 13:19:39 -0700 Message-ID: Subject: Re: Should vacuum process config file reload more often To: Robert Haas Cc: Melanie Plageman , Daniel Gustafsson , Andres Freund , Tom Lane , Masahiko Sawada , Kyotaro Horiguchi , PostgreSQL Hackers , Amit Kapila Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Apr 5, 2023 at 11:56=E2=80=AFAM Robert Haas = wrote: > To be honest, I think that the whole system where we divide the cost > limit across the workers is the wrong idea. Does anyone actually like > that behavior? This patch probably shouldn't touch that, just in the > interest of getting something done that is an improvement over where > we are now, but I think this behavior is really counterintuitive. > People expect that they can increase autovacuum_max_workers to get > more vacuuming done, and actually in most cases that does not work. I disagree. Increasing autovacuum_max_workers as a method of increasing the overall aggressiveness of autovacuum seems like the wrong idea. I'm sure that users do that at times, but they really ought to have a better way of getting the same result. ISTM that autovacuum_max_workers confuses the question of what the maximum possible number of workers should ever be (in extreme cases) with the question of how many workers might be a good idea given present conditions. > And if that behavior didn't exist, this patch would also be a whole > lot simpler. Probably, but the fact remains that the system level view of things is mostly what matters. The competition between the amount of vacuuming that we can afford to do right now and the amount of vacuuming that we'd ideally be able to do really matters. In fact, I'd argue that the amount of vacuuming that we'd ideally be able to do isn't a particularly meaningful concept on its own. It's just too hard to model what we need to do accurately -- emphasizing what we can afford to do seems much more promising. > Again, I don't think this is something we should try to > address right now under time pressure, but in the future, I think we > should consider ripping this behavior out. -1. The delay stuff might not work as well as it should, but it at least seems like roughly the right idea. The bigger problem seems to be everything else -- the way that tuning autovacuum_max_workers kinda makes sense (it shouldn't be an interesting tunable), and the problems with the autovacuum.c scheduling being so primitive. --=20 Peter Geoghegan