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 1w4h6b-002SbI-2u for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Mar 2026 15:22: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 1w4h6a-0010ap-1K for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Mar 2026 15:22:12 +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.96) (envelope-from ) id 1w4h6a-0010af-0R for pgsql-hackers@lists.postgresql.org; Mon, 23 Mar 2026 15:22:12 +0000 Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w4h6Y-00000000dxr-3Yo3 for pgsql-hackers@postgresql.org; Mon, 23 Mar 2026 15:22:11 +0000 Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-7d7f8f0d7c9so270658a34.0 for ; Mon, 23 Mar 2026 08:22:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1774279330; x=1774884130; 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=VyAY8+6TKz2+plehzU4OS/D4FYaepmc7TsAUSPTBsHs=; b=IymviU+DWpXgkFtOBpTS7eg4e0KNNZ6m8j43wNp17i2CjU07r+uGWDe+pQskPWlx1I JuxPnmkrLKSOC5+9xhE/IiZPmxcQ0N2dO6tlt9ZvnipuRN511548mmRl4QIK0HvAAVr6 rWGP1lJP4yto7BYBi7iJFm2WwoK3Y6pW/O9fk4vUx8cdiaWrcc7fPQwpzBOnF4KgQ0QP d3zTDmlJ8/8U+/uuV2tHu/eZBLxOKBh1SNs/XtApSnrLFDnaC/Ho/8jJ+BQ6vUy1NgRj RatqR/+dtRdv1r0jxAsB9f9NW3ScgnaIkFIqMG89DZL4q1N/lnXQHyY6DOBnx9Jc7vfZ wLTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774279330; x=1774884130; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VyAY8+6TKz2+plehzU4OS/D4FYaepmc7TsAUSPTBsHs=; b=cy+67YrllU+AFSO4RGvxKUPSYuzpNwpgUFESPVCsUVmTObcz6oo3xjEEYVDWc7IMnO Pm/dYzRpwT4iMSDpKrA7uwpg1Cf8/xPT2UX8JoctnLxAn5FCyepDGm/cIva/qewi6LxZ +YKxyAb7RiwCWEx4Tzj7bC2/uy3KSx24pjoFiVJXUs27nfNB8WBAhLvGBm6Kta25xofg r66IAtJWOlE3SeqGpAxeU9UR296c+AHaBYJEWoHv147/vRdGrsVbla4qPpt2wuKd1dew 52J+1rUQorpcMxirO3jGGZ+R8UT0YwxmVoOfUX486eB47cBHkhK27WBXGPD1BfXRvz6V JRLQ== X-Forwarded-Encrypted: i=1; AJvYcCUfMhudTPgY+uCHhL95YDBUxy7cw+8Eka2AdPvomdCjaneCj4c/JROESL19JooVdZGoi8/NGx2lCJC2hqkx@postgresql.org X-Gm-Message-State: AOJu0Yx+p6iEh6dJwIQzpYZyjDbY5bQTcr38K1nngSedVQ6AgJZ8aiX3 hc5y4IbyK+hnQl3yTjuanvXbUEn0mfIAvTyOlaH2v5n2haOvvVzNWhwB X-Gm-Gg: ATEYQzwaCLQKr/WfeRWHgHwIYfLYHXw1aXj2NJNWnhW25d2732SjtJOJlA+3eG/cZb4 E/sTUWkY6ZfY8roCXRmXZEEyNB1VRybJQSesabhK3W2TXNKbinMS/bEzue03lh38w2hp3XY/lwq pD4Q0YVGryx0E9Q4iq3cdyCJLrMMkVxp7uZy5oT4UYGbocVZqDZ1B54lMv3Da8twg0tIeaKvc99 rMPhusRqFqXD8fflzi+ojI/QsZZZ1AgCfB2QVMi3C+LwUkwuGVsnEwRY8DsvNfs17nIhd8eubyH ssndkSAUadRtyk6WV6rCjAmjktA5wgQwbyqWtY8UUIoXCx7FbMmyRtX1V9Y8IqTXmJv0rEQI9dH D112RwEJ3oGffbsxOPdEaYGnFgY31LAmhcRyKjGmSMvhO1JwQy1BciOY4SU+dzCKXNOJgexfIzU yqveL0Fy1MwCvup/NE/5Hcjx3J8rCAAsSjlCzA9Elo/dKCrxx13GK1eHG2f2uJjT1z5QVhi1rD3 ui8reSVeXMy5ouIZ8+nog== X-Received: by 2002:a05:6830:81c9:b0:7d7:de7f:1216 with SMTP id 46e09a7af769-7d7eb05988cmr7839359a34.34.1774279330219; Mon, 23 Mar 2026 08:22:10 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7d7eac3e763sm9877151a34.11.2026.03.23.08.22.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2026 08:22:09 -0700 (PDT) Date: Mon, 23 Mar 2026 10:22:07 -0500 From: Nathan Bossart To: Bharath Rupireddy Cc: Sami Imseih , David Rowley , Greg Burd , Robert Haas , Robert Treat , Jeremy Schneider , pgsql-hackers Subject: Re: another autovacuum scheduling thread Message-ID: References: <3ca1e398-c787-47e9-9afc-8e298b94dac0@app.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Mar 21, 2026 at 05:08:56PM -0700, Bharath Rupireddy wrote: > 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. Thanks for looking. > 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. IMO these scores generally shouldn't need adjusting outside of cases where the DBA wants to revert to the previous scheduling strategy or there's some other unique scenario where the prioritization isn't working for them. I think it'd be hard to give any general guidance, at least at this point since we have no field experience yet. > 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. I thought about that, but decided to leave those out because 1) the scoring parameters are meant to be global and affect workers' prioritization of all tables and 2) there are already a number of parameters that can be adjusted to affect the score. If users find that they really need reloptions for some reason, we can always add them later. Removing them seems more difficult. > 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. I hadn't planned on doing any additional tests/demonstrations here. And I'd really like to avoid burying all this information in DEBUG log messages. IMO we ought to eventually be exposing this stuff in system views and the like, as has been discussed elsewhere. > 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. Yeah, adding that in addition to a system view, etc. could be nice. I'm a little hesitant to start making big additions to the patch at this point, but I can give it a whirl if folks think something like this should be added for v19. -- nathan