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 1vM7cA-001WsX-31 for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Nov 2025 16:34:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vM7c9-002paf-1i for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Nov 2025 16:34:33 +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 1vM7c9-002paW-0k for pgsql-hackers@lists.postgresql.org; Thu, 20 Nov 2025 16:34:33 +0000 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vM7c6-000YU3-33 for pgsql-hackers@postgresql.org; Thu, 20 Nov 2025 16:34:32 +0000 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-b7277324204so181199166b.0 for ; Thu, 20 Nov 2025 08:34:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763656470; x=1764261270; darn=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=uiWuT5+K6y2uViTIUsaaw/l6Vy6JUG5CD733f9D5p8g=; b=eCvQr1iv9Me6/EyhRoydcX34k7B7X6Lgv16abIFJtLmrckwksvKx2rD8zkEa/yFx2E gSnSBb6yIdDcynO0Ggwc4hHXIfj/2s+4vqQQcl0CE6PsvIm+E/fjHNmZUMPvzDMdwCNm ZhUhN4HySrP/V7DNNgx9ffTRtT8KO8xGZ1f01QSvZ/HlJT8Oym4Bh5+vQ0GfY/9Ze3Qn W+pl0Ig+EL2r6sxgTK2gyBjEutA7egjot9qmtTyBPF5ZB0dPjM7jhBZn8T1tqmmJEIA9 q89sWcOTGywP3osoJi/9dD2Uko+kc3yiATfPXM/ezBiablinU/WM5+seVdhBoc1d+tsz DM3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763656470; x=1764261270; 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=uiWuT5+K6y2uViTIUsaaw/l6Vy6JUG5CD733f9D5p8g=; b=W72raSpoJv4b9lhqzZrYCo36sKzP4wkOEI3fLsMUgvPZI2TnrQLjkCUFiMQHqb3IJT mQNEK6VLi4pf5EUbl58e/Bpa0q6YvRUFpkK9Wmub06RI1S/qKcgUlX34NW4edN+6UjJf n7f7X0YwdlKfMWdshVZkKrm2NvuYThyuTKW7xfZ7b1CWIe364bF+uGNZWLxRYmQlEA5f O6Ri6p7ValMraE7bTG9hvCbka4drIbssPRBrbmO5201S55m7tF1HQ9DFmDEprvhK1Dwq I9r3SLmr2aidp1tjgkqsGu+3GIOy4nG54Odnz7d//nyKR205UELzyUpnAkCcZ0a7NnVK Tguw== X-Forwarded-Encrypted: i=1; AJvYcCXjxJxlRB4PTuK3PiLKmdglTHvgyqj1wTA4L84/viNaS3fHuJ2+iEa8dauidVOlMwOxDdI0md7sy0sOM1Ak@postgresql.org X-Gm-Message-State: AOJu0Yx517DNo5t6Iu10UVHlu3p1trAds8vZNfDHNnfhNR4DVhlTVp6w isOmOTpX4N3EnurOZACB2oVFsuzVwnHB3uq1jx+pixCEVAnhB1l5KGvTzoWsHgolBbGg21YFoU8 cq5JfPGR6A+h7d7yXpLj/S9so8i+cO0w= X-Gm-Gg: ASbGnctbuC0d3PzG7zn9j6vcFw0UCZTdKLsFvgvTMj6AgepTBLkw574wYhnLgd5L33D pHSjzZo9jfkIhnkPUWcyOdRqu0c9gvl0lkcAbIrW0dVbICVeAATXDufZrqQv+XR7/TOKV6gwR0j sAbUFqH0jROUjjdbgAQD6VtyfYZ6lbwKW7lp2JcUX9MKHYwtWCO4m/c63h5sILZri4RwtgWc/rm 9e9RwmV9zKFQdxeZEsR15rH9Unijig0AgYfQioTTbuscuHsza5C003IVIgBwtb2Xnm1Pw== X-Google-Smtp-Source: AGHT+IFmNnmPL9a/rq7Mop9uUqp9YWkLfHbL7aZWPZU9m9mNCGWCJchc/IzrnBhE6qBthsjeoJUDKlCYACqaBsivATo= X-Received: by 2002:a17:907:3f95:b0:b70:52a0:f2b8 with SMTP id a640c23a62f3a-b7654d02b03mr386288966b.16.1763656469962; Thu, 20 Nov 2025 08:34:29 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Sami Imseih Date: Thu, 20 Nov 2025 10:34:14 -0600 X-Gm-Features: AWmQ_bkyGNiZ4gvYUscKDKSgEJVT4NGjwSaHHlK26RGFSrSx0732qxpXxZrbJBI Message-ID: Subject: Re: another autovacuum scheduling thread To: Nathan Bossart Cc: Robert Haas , Robert Treat , David Rowley , Jeremy Schneider , pgsql-hackers@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 Thu, Nov 20, 2025 at 09:30:42AM -0500, Robert Haas wrote: > > Point being: I think we need to avoid the mindset that we can't be > > stupider than we are now. I don't think there's any way we would > > commit something that is GENERALLY stupider than we are now, but it's > > not about averages. It's about whether there are specific cases that > > are common enough to worry about which end up getting regressed. I'm > > honestly not sure how much of a risk that is, and, again, I'm not > > trying to kill the patch. It might well be that the patch is already > > good enough that such scenarios will be extremely rare. However, it's > > easy to get overconfident when replacing a completely unintelligent > > system with a smarter one. The risk of something backfiring can > > sometimes be higher than one anticipates. > > That's a fair point. The possibly-entirely-theoretical case that's in my > head is when your oldest and lowest-OID table is also the biggest and most > active. That seems like it could be a popular pattern in the field, and it > probably benefits to some degree from the sequential scan returning it > earlier. I don't know how much to worry about stuff like this. I think it would be difficult to introduce this new prioritization system without a GUC to control the prioritization behavior. Since ordering by pg_class has been the only behavior ever since autovacuum was released, there should be a way for users to revert back to this. The default could be the new prioritization strategy. Introducing new GUCs is something to be avoided if possible, but I think this case is a clear one to me. -- Sami Imseih Amazon Web Services (AWS)