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 1w0LsJ-001puV-1V for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Mar 2026 15:53:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w0LsH-009vM6-2t for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Mar 2026 15:53:30 +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 1w0LsH-009vLw-1l for pgsql-hackers@lists.postgresql.org; Wed, 11 Mar 2026 15:53:30 +0000 Received: from mail-oa1-x29.google.com ([2001:4860:4864:20::29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w0LsF-000000029rw-2huI for pgsql-hackers@postgresql.org; Wed, 11 Mar 2026 15:53:29 +0000 Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-40ef10ec84cso13599fac.2 for ; Wed, 11 Mar 2026 08:53:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773244406; x=1773849206; 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=+VJdqmw2Wn04DEElZWQq5nMX+f++prb/g1aWBW6fqHs=; b=nR52LaDP9lHR/HoCKq62Jj4Q8ezd1/dAJyDanW/yCInLD8JhXZezkA+pMfSPn33AJV fMPnUiCjF/5fhwkaNTeOx2QzEOx2IbEYty7a54XnI9Kp/tYQGRsHeWQkm1mCGudHwUbn UCTWUpmw0qMUeWkMIlUZiTt0lh6nGn7S0bAkVWy2qmurpqMX3iTPif936gXLdb7bop1k rqRY8/TmLY2xyTB7RJ5Dd9o34tNQBkQIGuGllvz8aD1xplnk1a860UP2q2Se8Sul9M05 57vW2GxJLDi7a4hC3m2khbMZdNx6xiA38sWqMtUgL+i45f1tmxrmkk3inqs/OFGmsvxa L6jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773244406; x=1773849206; 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=+VJdqmw2Wn04DEElZWQq5nMX+f++prb/g1aWBW6fqHs=; b=EuJIejlR16trr0K0ZMeDi8hMfehgLk1WrZ3D/LzEfZOC9s5PifNbFrvkB2b3f5T33b 1Dh6wL1NuZ6M7HR4OjbMEFIuyBsdDL8ylt7QuKEXketQNbszx2IaAa3uFFd4Idqb8ONv s1+40k065of2jNO00nIS3JJPLkRBxVlr37sN+LjQD00UjqNI0FjpGWvbFA3nb6M9VSg0 8JJzUK3kuBsH4AfHIdcqgSc8itOAnqCqxLoa4e3d3ly+xDWc6GWEOcPGCMAqAiHAjMt0 f10A1aa0EH4cKViknI2ZUIVu4OtBzswWZQyupU8KgloSLGDbTakPM/jj9cvvbirLmEzG 4t+g== X-Forwarded-Encrypted: i=1; AJvYcCWDD2YkaqZ8NdmQTrTDwsSX4JsCXNi2di9F/Lq8rRiraz6XYqIWWSB3pdEcycl7NxXucgGZm9Js9WgpZHsH@postgresql.org X-Gm-Message-State: AOJu0YyapD98IXrSH5dp+vlIcGvYGrser9baKOfz6txfYiebPmKcDHM/ qazhZPsyC8J5FThkYpzV7GEw4jBr5vkorEqBhvmRp2tdOGBJmQh20vpp X-Gm-Gg: ATEYQzyJ8gdKnLZkP4WpHIp1yj0BFxdbvJn37vO+yQQP/HOMq2ewj2I5zYY+zSb9jR/ lXU/W9F/mhangE77GwyU9QGqkj/roxIz05U4PDFLbTshgIqN2539LwDfUBePAt5KdQxxnqMk8te lBJPUsO0V1Kl3tNzSsGnKBQCgXWa1Si7UiqvbySapuCVwVu19RvzG/ArSdd9NKitTLSU9jD4LEP j/ccjlLGNAb0znLtwyI5FMQcEi1OqNU7SYmJdgG3avx/de2orJ/mTPthQnS39jj5lbhANxL0H0t 5qwdsorWoWnekP49et/HdZVjy3yKq1sjMpWg7uEwP7n5vcKaz6ac+fJjBv7MH0aGBN3JKSVUnFF 0taRopkeuAaPy1Y1AzPyrpPjt1V3gS+ombs5K8e6ot4zdIbSK1i+CyyJQywjwdZBPY9pT/mV3fk U2w4pFweHo3QSifXkIpuhpXuPRjUBtg103P3mvpCMFCip2Hr7ESk72/HxrrcRK9QE96H1tBQSD+ yaCaF8o7LLpJp2hGIAagQ== X-Received: by 2002:a05:6870:a40c:b0:417:5aa1:bc9f with SMTP id 586e51a60fabf-4177c96bb3amr1730733fac.26.1773244406072; Wed, 11 Mar 2026 08:53:26 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-4177e64a931sm2573911fac.14.2026.03.11.08.53.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2026 08:53:25 -0700 (PDT) Date: Wed, 11 Mar 2026 10:53:23 -0500 From: Nathan Bossart To: Sami Imseih Cc: Robert Haas , David Rowley , Robert Treat , Jeremy Schneider , pgsql-hackers@postgresql.org Subject: Re: another autovacuum scheduling thread Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nNr1ltPzm3pWzSNb" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --nNr1ltPzm3pWzSNb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Mar 10, 2026 at 08:08:26PM -0500, Sami Imseih wrote: >> + Oid xid_age; >> + Oid mxid_age; >> >> Is using Oid here intentional? I'm curious why not use uint32 for clarity? Fixed. >> The new GUC docs says "...component of the score...", but without >> introducing the concept of the prioritization score. >> I think we should expand a bit more on this topic to help a user >> understand and tune these more effectively. Attached is my >> proposal for the docs. I tried to keep it informative without >> being too verbose, and avoided making specific recommendations. Good idea. I put my own spin on it in the attached. Please let me know what you think. > The current scaling calculation for force_vacuum could lead to > exorbitantly high scores. > Using DEBUG3 and consume_xids_until(2000000000), notice how the score goes > from 7.93 to 661828682916018.125 once past failsafe age. > > [...] > > Do you think it will be better to just to add the age to the > score? I mean, that's kind of the point. Once a table surpasses one of the failsafe thresholds, we want its score to be so exorbitantly high that autovacuum is all but guaranteed to process it first. I see no particular advantage to tempering the score in that case. -- nathan --nNr1ltPzm3pWzSNb Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=v11-0001-autovacuum-scheduling-improvements.patch