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 1wG9pY-005wVl-0q for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Apr 2026 06:16:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wG9pX-004h7H-1S for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Apr 2026 06:15:59 +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 1wG9pX-004h75-0J for pgsql-hackers@lists.postgresql.org; Fri, 24 Apr 2026 06:15:59 +0000 Received: from mail-10629.protonmail.ch ([79.135.106.29]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wG9pU-00000002X2X-14Ug for pgsql-hackers@lists.postgresql.org; Fri, 24 Apr 2026 06:15:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1777011352; x=1777270552; bh=cZQyeJq8huYyVDVDNorBuBvWPz8L8HSbg5vzoCc822w=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=FYMTGo170reJ2Z24TiVsfP3cnZSZgYnjAzY4vAzxu44jEpiCctr5QR6D0vME+hLXM QaDMdWPR/35uKP6RAjRVS37peGLYsZyfFkiCjQG6ixjw70HU1Uwx1eIMU5F/xGRyDC wjSdZnNmZT+s5HgRn/GRKlZEc/7Iu4JSe3MwnVUOEOMHM+aBeKCsWNjcoK7R0Rc+1L OjkQK1pPsm4fWpaQhcNovaHn0oTwrfgVaI3QsIx3FnTJw8h7u9mT3msMFnt6ac//wv R2/qhFr+UBqWxwcJkVyBA00GNkrc/o4Nx8CrW+Fx6ZCY8H8FdmHgEMX7Pd5CIhkBHB DTbSdMi57RErQ== Date: Fri, 24 Apr 2026 06:15:48 +0000 To: David Rowley From: Mok Cc: "pgsql-hackers@lists.postgresql.org" Subject: Re: New vacuum config to avoid anti wraparound vacuums Message-ID: In-Reply-To: References: Feedback-ID: 4918997:user:proton X-Pm-Message-ID: 87290e4a2083874839b88e9b07a16c6b7ffbc09b MIME-Version: 1.0 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 Thursday, April 23rd, 2026 at 3:10 PM, David Rowley wrote: > 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 w= hat this change is trying to avoid. >=20 > 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. >=20 > There's some documentation that might be worthwhile reading in [1]. >=20 > David >=20 > [1] https://www.postgresql.org/docs/18/routine-vacuuming.html#VACUUM-FOR-= WRAPAROUND >=20 On large tables they can be quite inconvenient so avoiding them is preferab= le. My example of 0.1 is to test the patch if you tried it. The range for t= his setting is 0.1 -> 1 with the latter effectively rendering the setting m= oot. Gurmokh