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 1vMCtW-003mye-0K for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Nov 2025 22:12:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vMCtU-004bKY-2O for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Nov 2025 22:12:49 +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 1vMCtU-004bKQ-1P for pgsql-hackers@lists.postgresql.org; Thu, 20 Nov 2025 22:12:48 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vMCtT-000cbh-0F for pgsql-hackers@postgresql.org; Thu, 20 Nov 2025 22:12:48 +0000 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-594516d941cso1564374e87.0 for ; Thu, 20 Nov 2025 14:12:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763676766; x=1764281566; 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=ppvMvCFTN5DTKsmf71pPmz8aIJ+ZlzCFHL8jJYlJGUk=; b=T23D0PQse2xg3xHULS8+FraUlcUgXi0z9Q8APzLNhNVKBxqdtpa5h8lbavO1jvyOlO BqRscMnTM5k5s03jR+vhNSwmuGAtymaRg+FialABB/3fAxs4XrtvLgznlcNGdJes8vjj Ge3X18hZUKnke5ECgUzHoMbdob7h+0hgK1S3jnQyJGASGygcTPigE1BTQDXo+VUj6RGi 9weFNpJN2ZD11sO5rmcNZB4V1yGA0qU02YW581q+V+cTvV0OE7nUfjyr5knIwkrp6zvk dG9ZT7UJ59LeIPSIRkAhqjoztyXgosa5Ambg+/8GCwNrhV+4mtFjg+wu80Tfh3fOaIpm jfLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763676766; x=1764281566; 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=ppvMvCFTN5DTKsmf71pPmz8aIJ+ZlzCFHL8jJYlJGUk=; b=Q+GFzXZnG0ZgSp/7V6eyCPmA4PlQeWChmdtN1LSeKSkV0OiMaP8BYi3VGrkoyGGTUz VVsHR6LhFlj8tiBRzX4iaOq9GU/nEc8C1vdS/l0hK6FRHSMoD7caqsO1L8b9orG8Uv9d ftlVW7qyuW41Qk7FOuDo/2lQSoU66OJPxUZRctdlNdolZxM+ME4+MBmvoETaG9GzmYLt F4y+FXeYs+txvGdxbkEjPp4pO1FbqVdhyxB6Z+tq6PRpYJq+N8phZGDw5zPIN7623DiE oXCHjlrJ6Is3/SOrOrDTnefDAEVk+ADRsLkE5wgV7UxSh1N9C6WHmCehzLa+BiL7WumQ 3TZg== X-Forwarded-Encrypted: i=1; AJvYcCXyFl/OgbpQfsDQYnPOcPUQ8DeX34H0HcTPPbI3g02I3I0m3QZY6WFDt9f9/fb0tXEMjyu1qvs6nbB0Rfg7@postgresql.org X-Gm-Message-State: AOJu0Yx3qRDJuWY3G7soS1JOquDscJgodimvSYG+0/uqjaZEullHLGW+ 2etR+je0O1J1zRgKgnrefSKPL1w6vi12f+V/BQ9XBgzNiN5RMpvqNnJeG8L0xf9nj2svJok6Jde CTPKkY+fFn09PAVVP1xZREWAlEraL3yk= X-Gm-Gg: ASbGncuJGymz2im1m62UjD8vipTii528zuCwYKJSFpwdd0Ljbm1YA90OirhNoxL1Cug LMEUWjbAgMnzNIhWmD+X7SWx1sMQMY4ka8biHcGP8zC0fn2BkazroCJrI0m//io5nkloXcrO63b 9Cxx0H8EPwLWZtgtmSDn8VJh3wnQfCfB+TYcOzXG/ijnHydwQKh83uINOu2exeUIliYoShlzNMX k5YrWDl58o6CHf8GXltsB5ghBZeEpnHhaIhmQXvfbSgb26GfsZhjx9UBz5o6DCn0+hLUwIr0m8q ffcnp0ApnyGbtap1y1yZNdnY02wR3rUq+MVJekDBcK+wwQY6n47ylD6RZvhQ3w== X-Google-Smtp-Source: AGHT+IGa15+wVqg6J9Le7Jep5tBI3gObAkTekJ4PYvJGS6R2wxWab6HC1dNI/1epTakJEHCTBnofPueBKShF3NzJf5Y= X-Received: by 2002:a05:6512:398f:b0:595:8368:c2e with SMTP id 2adb3069b0e04-596a2e9cca8mr239759e87.8.1763676765992; Thu, 20 Nov 2025 14:12:45 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: David Rowley Date: Fri, 21 Nov 2025 11:12:32 +1300 X-Gm-Features: AWmQ_bnV5p7ZzMuXYPmrnMOiH_R6JEZeevH1vJD1K1IbDMnzs3vYMsAw-ka4Ens Message-ID: Subject: Re: another autovacuum scheduling thread To: Robert Haas Cc: Sami Imseih , Nathan Bossart , Robert Treat , Jeremy Schneider , pgsql-hackers@postgresql.org 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 Fri, 21 Nov 2025 at 10:16, Robert Haas wrote: > > On Thu, Nov 20, 2025 at 3:58=E2=80=AFPM David Rowley wrote: > > before we need to make a decision. My vote is to use as much of that > > time as possible rather than using it to allow people to dream up > > hypothetical problems that might or might not exist. > > That seems a little harsh. It wasn't intended to be offensive. It's an observation that there've been quite a few posts on this thread about various extra things we should account for in the score without any evidence that they're worthy of a special case. I used "dream up" since I don't recall any of those posts arriving with evidence of an actual problem or that the proposed solution was a valid fix for it, and that the proposed solution didn't make something else worse. > That said, I accept your point that even if we were to agree that > something ought to made tunable here, we would still have the problem > of deciding exactly what GUCs or reloptions to add, and that might be > hard to figure out without more information. Unfortunately, I have a > feeling that unless you or someone here is planning to make a > determined testing effort over the coming months, we're more likely to > get feedback after final release than during development or even beta. You might be right. Or after a week we might discover a good reason why the percentage-over-threshold method is rubbish and revert it. The key is probably in the way we act from getting no negative feedback. I suspect the most likely area the new prioritisation order could cause issues is from the lack of randomness. Will multiple workers working into the same database be more likely to bump into each other somehow in a bad way? Maybe that's a good area to focus testing. > But I do also understand that you don't want us to be paralyzed and > never move forward. Yeah partly, but mostly I just really doubt that this matters that much. It's been said on this thread already that prioritisation isn't as important as the autovacuum-configured-to-run-too-slowly issue, and I agree with that. I just find it hard to believe that the highly volatile pg_class order has been just perfect all these years and that sorting by percentage-over-threshold-desc will make things worse overall. There was mention that pg_catalog tables are first in pg_class, but I don't really agree with that as if I create some new tables on a fresh database, I see those getting lower ctids than any pg_catalog table. The space for that is finite, but there's no shortage of other reasons for user tables to become mentioned in pg_class before catalogue tables as the database gets used. I see that table_beginscan_catalog() uses SO_ALLOW_SYNC too, so there's an extra layer of randomness from sync scans. I don't recall any complaints from the order autovacuum works on tables, so, to me, it just seems strange to think that the volatile order of pg_class just happened to be right all these years. I suspect what's happening is that the extra bloat or stale statistics that people get as a result of the pg_class-order autovacuum just gets unnoticed, ignored or attended to via adjustments to the corresponding scale_factor reloption. David