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 1w3Bnx-000zQF-1W for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Mar 2026 11:44:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w3Bnv-000I7i-1a for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Mar 2026 11:44:43 +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 1w3Bnv-000I7Y-0M for pgsql-hackers@lists.postgresql.org; Thu, 19 Mar 2026 11:44:43 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w3Bnr-00000000Y4y-2mz1 for pgsql-hackers@postgresql.org; Thu, 19 Mar 2026 11:44:42 +0000 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-439b611274bso289904f8f.3 for ; Thu, 19 Mar 2026 04:44:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773920678; cv=none; d=google.com; s=arc-20240605; b=EAWPzQiodOnIGpaY8Fw/OUUOFRiEu1+NDUCnnP7JXQT/EIAvtx+V0ktvelmvXKS4Dc CRwQboxCH7ZsOU+oUme7vhYvcn9uBd0OEbrLkjxkiO+Zu4K10GWppIBR3yfdoK69+2HS uDQOA9j8Y1lUkRlr0DAeUwVwy9UrTWyIg6iGUmr7677/kqu4iAYm+CVOzr7Eg5WGhlE4 atmbsFNTaVIG0D1o1ejQz3tCg1s1QuFpzeawMLdW7tvl5WkYViJnbCGHEOrZ7ORW0EhW sRhNn5NoC5A9WgHT0lb+Twks3hphCYh9agCCKEwVuzgjFH7EETMQ1s/sTeQX3FlWqRg0 pymQ== 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=zGRD34OmeN2bxoTIsuC/LaqFcBve9splD9qHPOzUVO4=; fh=bdVk6YkRHG2yCi56glIwKgD400/6F+bUmIkxxvnOD/c=; b=chwC0SeC/ekhzTtiJYvr4crw1Lv7j4n37doD9RaB43dbGrBDmkCtF9bADPkDB2LGXd bwws1iJPQsfsLQ1K5UQqO5fafh+0Qx8CpRodJpBeToVaS0RgV2RfbXn461qS9A6xpErL 5NWw5WOoxXW0aJeAbN7SqM0LZISuF6FQG8aEM/Umtx2Nd7j8X+VZmHemBGH1TYh6HtdE PhHy7WpiBpIl3D9l19t2NKyWwNWopyFjxplrRj5c1+3Nu1TIvNqGqumBw9iLXmhLhB0S 4t71HENHcLMFE/lF/2G/A2cR7MWULU0Kc48G/l9Z0r9++gebjH3Hl/OZYKxfuEbDAQjM iouw==; 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=1773920678; x=1774525478; 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=zGRD34OmeN2bxoTIsuC/LaqFcBve9splD9qHPOzUVO4=; b=FII8FnKVLeWnGBohL12eu+8+k/nDdr8JMFabSp9EvfGB3tD4HL4M70L2dLHgtXfcsx gZlIDVvPaBU3bOO74UHx6c1r2yqyA0TTGHrHYZEQAJUQPT5LcmMThfR8pOzbx11ZTLUR EWwCXMBQl4WsoEPN6zG92GIa3K1wqOsXzIKWKSF3+xsBsl/VZ7gxCMNUbSrJTqg2etxN 7ym+0UUFJE9/U6OQ+aKSZJx9pZdGUqvsZKW1j3Pkzyxt7HBOfrH5XBNiXb6r8GJZiWss I9ipd5fWx5IerVG390SyRBd74kR3RCfk0eaT21BhLA28nUbLiiX/MdCyeINRb5WLGjPz bVfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773920678; x=1774525478; 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=zGRD34OmeN2bxoTIsuC/LaqFcBve9splD9qHPOzUVO4=; b=PY2kGRUxCb7Fve1zcJJRSuDf5sOB+e0926plrHBYhW32Xj4BI7U1wlHjfKOmgYPXWM aWk/EIX4sU+rcrSV/Q6KrJqygvFk8Qgl87zncytjTDp5DVS8stytVnarbzm9GI9vgD8I HX2NwRMddFT/5wn0TYxs5DRAZ7lw9cEjmzXybTjugFBbjqfw0vajWETj9Jdwn8zuUKvD YmVRGSlxt+LqWsMt/WwlWn6aXWD+P7TbCokc1rVheDIX7hz+dxXWp965FlrhScZD3ydX 1d3n4w6/1qhV00XAMBSJv89vCrzz1caVaMRf/1Mso/QxyPlci4FGxFj7RoyYVXM3qUlc lk8w== X-Forwarded-Encrypted: i=1; AJvYcCUTfzrxihHOh1kx97b1Q1X/x/5BYhbnz/+x6BFdpw20Q76ktJFTT9MMN6Xn8awWTqT6vsQVMQZj9F6xi63N@postgresql.org X-Gm-Message-State: AOJu0Yyg3BeeMM2n2qaEB2SB6x6cgit+D5gELaHoBTbUk7ZNylpYC0DL yIydn4frca7cZZg6ojp8YdNuHkhieAzej4NiWlY21rcRio3r+n8/pqD026ra1UP03sCfRpnPokl d6YiqvM8btw74Xrnv2C/Es7lKXrrhp2A= X-Gm-Gg: ATEYQzxqPZAXaWw3HOoCVuWtrXb7yztiKRedv4NlDt8VBOel3A7pkx9tvHIsRZVPMbO JA6ukgljM8pheDsVS4s1WfZS22JOrJH2/VtL+tkn2Cs8iE1XbL1tt2RBmgRCsiJ4xRQ/NbsTuGL E1VY4myc8iJvanhUR9gRo9/GEKe3JFGrhs1kso7wxYn+ooQnZWu/eZXAKaBKEaiYqIgsHUCjpvL 6z/1V6vKeoKriC20I4sZluYNwqrNtz9bb5UZu6AlL1X/mq6Uk0obxMzIdDr/gxDY503RjSk75bU yDBegj0G3fgbzQeBx9CWAc/52TjUGLfKSyFh+H4N4Nr4FeZ102EKjMEFr3eIya1J3g1XOMII9Q= = X-Received: by 2002:a05:6000:2312:b0:43b:50d6:4f14 with SMTP id ffacd0b85a97d-43b5279c87bmr11427422f8f.6.1773920677874; Thu, 19 Mar 2026 04:44:37 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: David Rowley Date: Fri, 20 Mar 2026 00:44:25 +1300 X-Gm-Features: AaiRm52y-BAz0NqE811BpjfvsVs2jIRE9hnADtc61jrKtq9NJWWHLrlvOBtaG28 Message-ID: Subject: Re: another autovacuum scheduling thread To: Greg Burd Cc: Nathan Bossart , Sami Imseih , 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 Thu, 19 Mar 2026 at 22:57, Greg Burd wrote: > I'm late in the review process. I know David Rowley proposed the unified = scoring approach that became the foundation of this patch, and I think that= 's a great direction. However, I'm concerned that the patch's default scori= ng weights don't give XID-age urgency sufficient priority over dead-tuple u= rgency. The weight GUCs (autovacuum_vacuum_score_weight, etc.) can address = this, but they max at 1.0, meaning you can only reduce dead-tuple priority,= not increase XID priority. I think that it would be good if you could state *why* you disagree with the proposed scoring rather than *that* you disagree. All this stuff was talked about around [1]. For me, I don't see what's particularly alarming about a table reaching autovaccum_max_freeze_age. That GUC is set to less than 10% of the total transaction ID space of where the table must be frozen. Why is it you think these should take priority over everything else? SLRU buffers are configurable since v17, so having to lookup the clog for a wider range of xids isn't as big an issue as it used to be, plus memory and L3 sizes are bigger than they used to be. Is slow clog lookups what you're concerned about? You didn't really say. Having said that, I'd not realised that Nathan capped the new GUCs at 1.0. I think we should allow those to be set higher, likely at least to 10.0. Maybe we could consider adjusting the code that's setting the xid_score/mxid_score so that we start scaling the score aggressively when if (xid_age >=3D effective_xid_failsafe_age / Max(autovacuum_freeze_score_weight,1.0)) becomes true. Then, if people want to play it safer, then they can set autovacuum_freeze_score_weight =3D 2.0 and have the aggressive scaling kick in at 800 million, or whatever half of effective_xid_failsafe_age is set to. You could set yours to 8.0, if you really want tables over autovacuum_freeze_max_age to take priority over everything else. I just don't see or understand the reason why you'd want to. It's a fairly common misconception that a wraparound vacuum is something to be alarmed about. Maybe you've fallen for that? I recall a few proposals to adjust the wording that's shown in pg_stat_activity to make them seem less alarming. David [1] https://www.postgresql.org/message-id/CAApHDvqobtKMwJbhKB_c%3D3-TM%3DTg= S3bcuvzcWMm3ee1c0mz9hw%40mail.gmail.com