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.96) (envelope-from ) id 1vM9Vu-002MIP-0p for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Nov 2025 18:36:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vM9Vs-003TYo-2n for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Nov 2025 18:36:13 +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.96) (envelope-from ) id 1vM9Vs-003TYg-1r for pgsql-hackers@lists.postgresql.org; Thu, 20 Nov 2025 18:36:12 +0000 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vM9Vn-000ayN-37 for pgsql-hackers@postgresql.org; Thu, 20 Nov 2025 18:36:12 +0000 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-b762de65c07so189037466b.2 for ; Thu, 20 Nov 2025 10:36:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763663765; x=1764268565; darn=postgresql.org; 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=2mUo+NCDnXBMYF/Z1MgdcZYUisu8vqp5N28Yg1ypNPU=; b=aFFAVkrUoYLfkZt6AwcK+tzQxhF2Os46HW/u8Bkl7jW4jx0qPI6+z/6hzzuDqOs5EH GY1RcTyJT67XxbBnBrMRO2zEXaE76Xo9Pq/21fEkx0jn1K4y8ltRlHd9LSiwQuLIiWBq /Hn9LUlSU4EMU1zD+8EgGlOQrk3gAvKdWBBRUmU2p/mP2RoSoULBwdAdNmkcsAOWweaA 1G+wsVMgh/LlSFJUkvqIwtIasSjIp1DjQB4fgkYr1uyKk+v5PgOccamLBzHYtW3oGwwo YSB/YkF3hQ8Jr+IMXfK5R0OZbtAK6tRIRrZ5mN3NgT7I3qmTe57bXndUGiFHHlSZZ4WT /o1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763663765; x=1764268565; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=2mUo+NCDnXBMYF/Z1MgdcZYUisu8vqp5N28Yg1ypNPU=; b=POUKoe5xh50rLqY9qsbN/jOgBAqtIPnNHVUEmZcp//2k+9RnubIJ91Lx8rwpyzvWbe fXYCzfkM5+cZW90UCCdPdo8vADYCTsF/Y1JLLyHhFU2USxbACmmRipI4GjczjX4q1Q4r a3y7EtFWHNyQgIAG2yxL+wWfCWHwlvoMIUWuTge3lf7mDf1zyw7XUjePfNbznAa7a9w+ FjT3PVBm+CTasrf2kBgAV3ApsUDhdFi1IbiqhyFXKat8oOLzMxTnlXkxiSDOeG1Y9RLV gFobTobVC29Pw4IyxGUVk7gucEzZITHcWDeWsFhntRwzZJO2ru9o9vQMTIIiEo9gR2BD qD3A== X-Forwarded-Encrypted: i=1; AJvYcCU+qLXNAlqJvHwveYVJcwPL4E7aTI30Db5f4NxLqQDBuf3t8E4maH0sjo3ksA/JKOckZov/YEGKCDUxUhxz@postgresql.org X-Gm-Message-State: AOJu0YzDsp1fF7yEHoHPiPS7qeIQZ4Wt9WK/72FWwgOVR+B2odpKBB/3 x4qvD7KzaKPGSzqTov4v9Uv8NJ+ENAOszE45Hab4a7xbSM4hWrCMJ1JA0wiAFmBsJcGUL59Dyt/ XCZp32VvpFaBy3velV74+e9AR15mJNL4= X-Gm-Gg: ASbGncu3xSh/lgLsZXvCJd5fvV8VcsdbHHj1uuWcwiXoXxkQIt+dh7Ncv24qtRUeyLN vSlPbGDt1JmeUBQyegjdGYPPz/ijpiT/bf3+Z9/MTcSaLOqTWIGQoD96vKr1YrVKsusH1bJCWYM mK6HV9ewQSs+Q9ABjTo4rAUahfZGGkPClsrFC43SP1TEMIv4AKR4NUJcRc5mNetJjeQBy+7Jz8z x1zoTcDzRRVaHC9ngQ85r9PnfWh5U+n9Ug71pUfF/gYtC6/gVLhKTRG6PgTDK8oPoj6K4DfKmdq X9nhLdmHw32491xBTZuUVZ/OIG4= X-Google-Smtp-Source: AGHT+IHHFyJuRau+AMmB1CyWYjJIaVw6849DMJ1cpjkFaEkvTDb+TVa74cJJOO6SMhwIht08Yeb9dCbquIdNmoD+wMA= X-Received: by 2002:a17:906:7313:b0:b76:3b69:cb5 with SMTP id a640c23a62f3a-b7654e42682mr465758166b.21.1763663764544; Thu, 20 Nov 2025 10:36:04 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Robert Haas Date: Thu, 20 Nov 2025 13:35:52 -0500 X-Gm-Features: AWmQ_bkTvQSDXPMNsxQla_vCStShCkHxOpQMZW48Lzs-g8TqwisR5L0mYcYTIs8 Message-ID: Subject: Re: another autovacuum scheduling thread To: Sami Imseih Cc: Nathan Bossart , Robert Treat , David Rowley , Jeremy Schneider , pgsql-hackers@postgresql.org 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 Thu, Nov 20, 2025 at 11:34=E2=80=AFAM Sami Imseih = wrote: > I think it would be difficult to introduce this new prioritization > system without a > GUC to control the prioritization behavior. Since ordering by pg_class ha= s been > the only behavior ever since autovacuum was released, there should be a w= ay > for users to revert back to this. The default could be the new > prioritization strategy. > > Introducing new GUCs is something to be avoided if possible, but I think = this > case is a clear one to me. As I sort of alluded to in my previous message, I'd rather see us introduce something that lets you get the behavior you want than something that just lets you get back to the old behavior. Technically, the latter is good enough to avoid any claim that we've regressed things: you can always just the new thing off, and so by definition there are no unavoidable regressions. But that only caters to the scenario where the current behavior is good by accident (because it can never be good for any other reason). Don't take this too literally, but just mooting ideas wildly, suppose the scoring has a wraparound component, a bloat component, and a reloption-driven component, and the former two have a weighting factor that can be adjusted via GUCs. If you want to shut off the new behavior, you can setting the weighting factors to 0. If you want to keep the new behavior but adjust the trade-off between the wraparound and bloat components, you can adjust the relative weighting factors between the two. If you want to take more manual control, you can use the reloption, a choice that you can layer on top of the default strategy or any of the alternate strategies just proposed. Of course, making this all too complicated is a recipe for failure, but I suspect that making it at least somewhat configurable is a good idea. --=20 Robert Haas EDB: http://www.enterprisedb.com