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 1w46NW-001rm0-0R for pgsql-hackers@arkaria.postgresql.org; Sun, 22 Mar 2026 00:09: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 1w46NU-00C2wp-10 for pgsql-hackers@arkaria.postgresql.org; Sun, 22 Mar 2026 00:09:12 +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 1w46NU-00C2wh-04 for pgsql-hackers@lists.postgresql.org; Sun, 22 Mar 2026 00:09:12 +0000 Received: from mail-oo1-xc36.google.com ([2607:f8b0:4864:20::c36]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w46NR-00000000QCi-11b2 for pgsql-hackers@postgresql.org; Sun, 22 Mar 2026 00:09:12 +0000 Received: by mail-oo1-xc36.google.com with SMTP id 006d021491bc7-679b072ed3aso873725eaf.1 for ; Sat, 21 Mar 2026 17:09:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774138148; cv=none; d=google.com; s=arc-20240605; b=Q9j/bYuCdr7z9NrKyvJ5edxfAV8GXnHu3z4U2K3txWnMX9UMSwvW9kCTg4WJt9scY4 IpUuZNj05+rOLBhI4SHLovLiUkB1K7yOe4z8HDIAbVmR0brGGPwWXDX5cSvvqcwQnpaI 1Uu76sE6Rw1KYE40VdPHZmaDs7odsS8wQxAU8XsVB122G2AsZVc/2Awh7d8PEB2Xv2oa MMdfPk4tcNux+8YwpI23nk4EzAJjvQ/38adk1iYI5McH7XxB/4eHnn2SXBnDK0i4Y+uN +4Sg5xs//kCpnvB+kZaGQWc5v53HY9j0HPcL+XCKz8oGH1Woe533ZKm/MUK7CToL46wp AI/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Uf1I8kataI3Q9uKEjwKOqjgYxd7NTmNFzEJlzVe+WQ0=; fh=AOL9EpbQpMBVqWAOb2/icAZ1OgFSq6xT5y7ZqIcJB84=; b=Y61CbWJzQvS8T2J2Zt1JrkABv/K6uEnzd+kbSfoOQ/D1aea0iMIIHxLlbYJNzxBrZJ d3BI17UmSK55KWM849zH2tIVgwXJD/ANn+omhd8pLA/hSRGUVB7kKoTua+Pt9sEmwR09 k47pvq9VQzrB207AeFWO9bS02CWdXYndJ6mba4OWp0xwv1eTaFEHc6lI+PSmVPPHy7GL /QOp+jZKCcsbMirXyl57Ph9AfelGwaJ8q+A12F1xpETvEP6M6SHiuba9Q87qUfjBDeJR V4kW6L5JutBOewMv49vMx5SYI6FhntKyh4x6njHiQFCGg/uzkREFVgQ92RZk5HR7IymM XAIA==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1774138148; x=1774742948; 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=Uf1I8kataI3Q9uKEjwKOqjgYxd7NTmNFzEJlzVe+WQ0=; b=R/vmlbplsc0J3QEuaI9eXWlthPUyMdI3kKGYWaPvNWhwfrtZbcusjY9JB54RHjhS6U fhHMMhuYapKJHvE3/OnB8vsX5xQM1r1obnJOdzmU0ZY7mUU8oqz5IGUBPfWXXc4+bH9x gglJiCwmBVdPPI90c/CSc2CfXnoo68fuZulAMEC5PGJOvFpnZAq3lHwpYbG+tO3H7W8O oegjd/uP7T7mMd4bdcOsZXNz7udZVuWLIbEiwBqs14eCHhIrq32tr2DOJ7AFlaUsJqWs bj8i+y5wsH/LOok2FgnLutLK1AOtS/LAWzlXstsqs6c8eOJYfqg3MOF4yF39dCyflKR7 VLbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774138148; x=1774742948; 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=Uf1I8kataI3Q9uKEjwKOqjgYxd7NTmNFzEJlzVe+WQ0=; b=CIN0KglnC8cp257m6hU9H3q+uXPWHpmK64AZfE+vu2ZH9syj6QQNg+hsLHcMHdbNdC y/K18WunckIhmnMqKQo7EY0AXnr2olxu+prNFXXIyT/Xj1Lrb+IpHP0rWhW5c9F0mEEr N7kdKcjC9xR3JCZfyBUDh8NRYAmP0XiD4t/ikU5uc+cZa/IwAjiz5ZeLs+67IqDOjrbF vjXdNTM7EanIHUJslxqS5MAp8SywMmoPFOtIxXE8kOEqgk+EnERioQj7WwLTVSw6HZNp yNda7tmq0eggVEu49SXso8cdiqwibDmtzJt2L2RIizWD2gQoLU7Jz/dR/AQ3YBKOke+V PBMw== X-Forwarded-Encrypted: i=1; AJvYcCUa1zxZjCJUYmPS2vBKJVVr5gTez3lWwiwlN30M7fbBK4iFsWt+GnZHrIxAv0TZl+nD6VA2YqwlGHlu4Jyy@postgresql.org X-Gm-Message-State: AOJu0Yx6SFAGuvOcm5gLVGkEi6IUD26iTOKG9kWE7/Gun+JUHLNv/zpj TZw9Zgs683CBPnIIJS+til69MRrJUXznIJAdHRyS4TZqmziJN8Shn7dUVdsUhindEcoWFE5QdaH 86TPFXvYCasbmT/g5zCUQ/mFF5m76S8U= X-Gm-Gg: ATEYQzxZwAGMlaunvRyHaoXZbTj/sTd2bfb6NsCh0sDPJdQv7SkDuK2p/3QXBj0ycPz AqquDJUg8RjFa8tRkGO6G4rMT+OrRMTKNZiEn9OsKqLWAn0JyUpwKP4hYUWB2d5+/sp2l8CMxZk Lj9Jzf2cJG5vU1yN4dGhQVp6eZrijlxUa8IvQ6hfwbXdiwazZeqC9DSjLf/qkXrejrxrGi3ey5Q jpMH15SxxkUw0BE1bgzKN6PlK9kMLeAnKPEmXFjWW42D/qbz9NEdUE/08hUC5ZHMcztWY2+8fvg Mjms2Q== X-Received: by 2002:a05:6820:2909:b0:67d:e102:da05 with SMTP id 006d021491bc7-67de102dbe1mr1505786eaf.63.1774138147851; Sat, 21 Mar 2026 17:09:07 -0700 (PDT) MIME-Version: 1.0 References: <3ca1e398-c787-47e9-9afc-8e298b94dac0@app.fastmail.com> In-Reply-To: From: Bharath Rupireddy Date: Sat, 21 Mar 2026 17:08:56 -0700 X-Gm-Features: AaiRm52W9dcaatydrZEDhHBSDxfAYeA1RsZruGThrXmA4Z5WHFZ73cRCdaqJ1SI Message-ID: Subject: Re: another autovacuum scheduling thread To: Nathan Bossart Cc: Sami Imseih , David Rowley , Greg Burd , Robert Haas , Robert Treat , Jeremy Schneider , pgsql-hackers 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 Fri, Mar 20, 2026 at 1:31=E2=80=AFPM Nathan Bossart wrote: > > Thanks for the feedback. Here is an updated patch. > > I kept the comment about the weight parameters in autovacuum.c. Since > there's a bunch of code related to them, IMHO we should have an explanato= ry > note somewhere. Hi Nathan, Thank you for working on this feature. I'm late to this thread. I read the patch, and here are some general thoughts. I haven't read the full thread, so some of these thoughts may be repetitive - thanks for bearing with me. 1/ The Autovacuum Prioritization section in the docs is a good start for explaining the usage aspects of the new scoring system. However, IMHO, adding a couple of production-like scenarios showing how these scores need to be adjusted and used would be a good addition to this section. 2/ Any plans to extend the new scoring system to the table level (i.e., reloptions)? I think it would help in situations where there are huge tables that need to be prioritized for vacuum over others, so setting the scoring high for those tables would allow the next autovacuum to pick them up first. 3/ Any plans to add tests to demo how each of these parameters could help in various situations - when the system needs freezing to be prioritized for avoiding XID wraparound over cleaning up dead tuples, and when it needs analyze to be prioritized to get correct plans, etc.? If needed, we could add elog(DEBUGX) messages to emit the reason or effectiveness of these new scores so that we can verify them in tests. 4/ Is adding a reason (such as how each of these scores influenced the autovacuum to pick this table) to vacuum progress reporting a good idea? This helps answer some of the why and how questions when the autovacuum is in progress. --=20 Bharath Rupireddy Amazon Web Services: https://aws.amazon.com