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 1wFukw-005hLy-1f for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Apr 2026 14:10: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 1wFukv-002Aw2-2P for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Apr 2026 14:10: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 1wFukv-002AvP-1W for pgsql-hackers@lists.postgresql.org; Thu, 23 Apr 2026 14:10:13 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wFukt-00000002evf-1KIb for pgsql-hackers@lists.postgresql.org; Thu, 23 Apr 2026 14:10:13 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-43d572f7437so4469437f8f.1 for ; Thu, 23 Apr 2026 07:10:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776953410; cv=none; d=google.com; s=arc-20240605; b=NkybXq/y6oRycCP83N9wPrPMANmPzlmhj55WXajk+EeveSrPg3RN2tNw6LULKoTDiB kLz9HqxMlzQC2Mk/7FO6S8R8Q+ZaLpvuBjcL72DpaqHIoGXilPazOXKdaPmoMDilRx+y kAGLIRkAW3VJNlVw44D0A5kPtfiTqzoGIzDwHS6zF6jkryOtAUcaY5UXCjCVSGGSfVAv d9RXQ8DCQg+7Ogk2iDiYBsFFIM1whdPGcnvySqyPAwVEaLaEczsrqzJG+m/jA3P8l58Q FEREyBkAebpezdH/7nrjy3amN7OrBgsguU57pZV7HptizNu7gGVTq0VxF12T8eNU2965 E5Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=ab2rtMjxKFWxMlJ6bYwlHM+77e1NtXdHWbvXwfhTGXo=; fh=+cdNiDkuLse1l9QqPeahuJnRAwQVKxC2tapFS48FUNY=; b=cGTThSVRbarQAryuVKi3me/yG8PRN49P3Qu1T1AUlNGP+F82nq/00QZoKLXhCTxXkR 7peWoP2HaPfs6VlXyX+yLDkP/KBWgCN/lKmlk1k2LB7ggW/rdbxhlbxY/eHrxZYvGPZj KKmVVCBDUFPSGWB1gPHwR6qxQPdjRmvJA15UOgllZx49mG40p3dKCvEO+nrJnCrCNrbP v9T+F9bdAlgtnj5GlyP98BBdbMzS5xxhQ00oRJw/oHoScrPJi0BJEAfdAqIJwYCcx0WY 7hN8M57ikH4VJ5aIZ81Kcl9e5m6b8pQ7nomSL+++X//huuwdNsWJk/8lDq6NSjvE8dMl /+ZA==; darn=lists.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=20251104; t=1776953410; x=1777558210; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ab2rtMjxKFWxMlJ6bYwlHM+77e1NtXdHWbvXwfhTGXo=; b=W2+/YP1gkHFJRmCZiJD6B6OzIW1f8rOaaSXH4bi2BfHRmCwPw5B//0EZbIXujPW14x Ph4r8igl2njjEQTup05yy7cPlWm9j9g3eSoOnuWDCU8fUaj/X5bvUlJcVZs5TXIjWai6 CDqeU8eM5wzVV44xEVegzn3JD3v0bDBVm78RvhZy5qkDKrfxTZrAjDK4syT6YFvV4WMF SrZ3JCPievnoLuNG9v5P9wBHiuoWrOkUi7dQ1WgUCbSVWJ/o5Di7fy7HsLqbcrq0Ool/ 89DU2h5UzjDvQICCzOVpeSk9zzJyb+LiVXgkFWKOwKkyXlwyJLW9VLVcf4/Wo76vLOXD ZJ/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776953410; x=1777558210; h=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=ab2rtMjxKFWxMlJ6bYwlHM+77e1NtXdHWbvXwfhTGXo=; b=IGsURAtu+JxCmDUFetVf/nrUU1RPKsMhOnezV0Au71+pnOi+ioCgAtc3KkSfZmHvEB vdkKLiFMyz45pW+pNyzraakaVP5r+ltnlDsNRV2kf0MTABaVB7TrVGfRz5j/0vYrEmdQ JEkXURive94G1r/EqPyj8f2j8e0M4zhydm+M8FMVMNRFpUnhgUQNbEOP1WFEA2+Jh64y Dk92o03rHjHP8yWKQ7/eOethdvdN1w2DpWss69gEIsY5XzJnKGOX1mxShg3YyNVLvXbb pLUkQBRSufrczmoEWDkP90ajmp38LgIR9+rFxUe5b0dcJs3LaSBbIEGjsA27X/HU1Ypg pdmA== X-Gm-Message-State: AOJu0YyJs2E2J39Xnl9DIxpKgRpYMyXTFxQTd9mjZj95xb3+BBn3XWHk GyB6nG7YpUmU+va/r33ptnnz6tCqT7wKz0lAYtG4bPnLpBFlcpN92/vgpDZFnDMQl+b1EZ8bnF4 xGsBNAhFLw/9KjW3kx0sje/ruK3MpqpU= X-Gm-Gg: AeBDiesVjxLxu0ZztkZJpp5cEw8V3arjxmpPc/hPuBbw7/wM78fKMZjydMBrk0hyh87 MtVrxwMPPda2Tv6Ypc2DfHMwFCAXUlsgpLObq1bgMRb67bkv3TfLHQ39ZbjrWG/G3fC1QxNEQZC iLrNGPI1gteJqh3UQFcMyrbDRpaY+nWHe8HXmr7c1scxuKoR/u4tPzxSZwBUiGF6MMEAVnGp/Uw +ODRcCCVr1GftsjGa7RFFfWye8JiFRW3Aesx/xXeJsgll1ZTXY1Uah53KOQ+t483h/XWQxTQymW LStOvNVHjny5Z3F+I2S2AAvb7RuGErsLa38JJB9SdRRKo0cTNZrl8QvkNjBavqAFC0Ht+tugOvu AMA2Pwoo= X-Received: by 2002:a05:6000:2c04:b0:441:1d53:cd9e with SMTP id ffacd0b85a97d-4411d53cdafmr21373546f8f.37.1776953409863; Thu, 23 Apr 2026 07:10:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: David Rowley Date: Fri, 24 Apr 2026 02:09:57 +1200 X-Gm-Features: AQROBzANsy352faoCTZsnZfkcn-5WcbTij9HuUzAeDDjRMuXbC8Y8u5XpIqL-Wg Message-ID: Subject: Re: New vacuum config to avoid anti wraparound vacuums To: Mok Cc: "pgsql-hackers@lists.postgresql.org" Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 24 Apr 2026 at 01:04, Mok wrote: > > On Thursday, April 23rd, 2026 at 4:44 AM, David Rowley wrote: > > > On Thu, 23 Apr 2026 at 08:19, Mok wrote: > > > For example, set to 0.8 a 'standard' vacuum would be triggered when the table reached 160million with a default 200million setting. > > > > If that's what you want, why wouldn't you set the > > autovacuum_freeze_max_age to 160million? > > Because that would trigger a 'to-prevent-wraparound' vacuum, which is what this change is trying to avoid. Yes, it would. Why do you want to prevent them? I believe a few people have been alarmed in the past about the "to prevent wraparound" text in pg_stat_activity or when they saw those words in the logs. The default 200 million autovacuum_freeze_max_age setting triggers an autovacuum when it's less than 10% of the way into exhausting the transaction space for the table. What you're proposing with an autovacuum_age_scale_factor of 0.1 sounds like it would result in an auto-vacuum when only 1% of the transaction ID space is consumed! I think you're under the false impression that these anti-wraparound vacuums are bad. They're not. There's some documentation that might be worthwhile reading in [1]. David [1] https://www.postgresql.org/docs/18/routine-vacuuming.html#VACUUM-FOR-WRAPAROUND