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 1vNYLj-006HGW-0p for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Nov 2025 15:19: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 1vNYLg-001P3g-0k for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Nov 2025 15:19:28 +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 1vNYLf-001P3Y-2z for pgsql-hackers@lists.postgresql.org; Mon, 24 Nov 2025 15:19:28 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vNYLe-001FWI-1A for pgsql-hackers@postgresql.org; Mon, 24 Nov 2025 15:19:27 +0000 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-b7355f6ef12so929127866b.3 for ; Mon, 24 Nov 2025 07:19:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763997565; x=1764602365; 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=1TVC+xOT33OZP45Z9sRBUAWk0NeyCKqYg8mo7dexYqc=; b=U1GgATfqkMKPESCU8ToK/Ozh+SIhSvKzNLMnYIPTUhUbA4nlv1Z7N1xL7Xm156yoMk JbKso9XGSXEwG1b2enQdzawcs2m/exnqZsDt5zLY2LjX6oHpFROhRnAn6Ibz6mYsYIry PqumXWQUcZqSbrgujfHp3kEOPztBPGqPdJM2IQDmak9XOZziBC+FwxeMgbgvjuKnBtok 0P/4WHsY975vOAxJnq+qBkiXC7oRVm0VQtJBrBdFSVp3Qe4OO6WNFsWbhtMLBf/ORleS og51I7ycCrsChuiBf2Oz9ljBVvtBzebBpqHD7DciKM5BDTzZhrX5VTxExtCct9fEtyH+ 62UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763997565; x=1764602365; 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=1TVC+xOT33OZP45Z9sRBUAWk0NeyCKqYg8mo7dexYqc=; b=L71q/w4mexHEWcpUMYzmRQITS3OjCX7ST6D5/o2644xS/xkITBMk/Zm1QAL/6BeG7O Q7eZPjVy00My1APegdAHdiqDs7APsAM5qHIOawmZUfGxEW9SQMAKNDfFgjEqMsXc1ZOa doROYGMtGYooxJhLPHDxpYJcJtGMW38R5FiwYM5+YJ/96kRmiCKKFnJJ3mF5W3Z9w8t8 u+PW5JCCoNygNhDPqIIZiwsrUKeRzhK5CVqpHi30Ti4xdSJh97FzqAJptRVHw7Tudj3y Qfp585AEnKafToslO+jGRg5KhsowiWNNIEjV8CtImjfAL2JpGRN8HuY3PiXq5HphxYyJ VrYw== X-Forwarded-Encrypted: i=1; AJvYcCWEdKpkbthLPzP9JoiiJq/7L6uoqcGs4YLVNE7xjRWxOtwgb8YzbU/svOL7Umxf77H0t2uN2q8Xy0rovjkf@postgresql.org X-Gm-Message-State: AOJu0YwUn5BzHJJqfdeocJn28oFbuC8t4mDn3QAowYrvzMwDvaphdwbf C4UxnF3YXjn0XYvVNgmSSEbuNVjSA2YC2D51SQ8EbRU3YcRmW0eMkkxX0gpzJl/4xOT4B1YuzvF R3706WYEmVk26nM/gLahAkjxxFsGTe8AqV9tI X-Gm-Gg: ASbGncvt7KGbmnYIJeBH/HL54Q+dRwrVD80NGIsUFA9vXWNqQXqf1SJ8dEgzIDPwVtN ID7jl8DhW9Uy4c/CC2gYuYGpCzQIngd26eeoqThEMFO67l5JMNyT7BNtGyM1UXV1xCpzUOc5P/G 4TrWVq8NAiTENB7sfIi5fCzrdOWn5sHdZP928X0d7ezLWoqIuLkMkiwZJtmK9Y7af+zqtG79fm2 lHsawvUgpEixwwAdzDVUFwHb4BmDDlKRvh2LVVzbsrzWPFy0etVjFPguZinzpVSFr/QDA== X-Google-Smtp-Source: AGHT+IGa4XuC/V37kkVXoTqkQO1AYxGs5gK7/p2Gw8Sk1HQQoKh7Lg/oz8RH02jrI0na0Uox6baT/50viQvCC94MEj4= X-Received: by 2002:a17:907:9288:b0:b76:23df:c997 with SMTP id a640c23a62f3a-b76718977d5mr1465180466b.54.1763997564558; Mon, 24 Nov 2025 07:19:24 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Sami Imseih Date: Mon, 24 Nov 2025 09:19:12 -0600 X-Gm-Features: AWmQ_bn8qA5UzIjwSphSSof-b2CRiyoYDjH9fnzQKwqotgzRiz0ZFZhfALqHGb4 Message-ID: Subject: Re: another autovacuum scheduling thread To: Robert Haas Cc: David Rowley , 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 > > What I have not been able to prove from my tests is that the processing > > order of tables by autovacuum will actually make things any better or a= ny > > worse. My tests have been short 30 minute tests that count how many > > vacuum cycles tables with various DML activity and sizes received. > > I have not found much difference. I am also not sure how valuable > > these short-duration tests are either. > > Yeah, I'm not sure that would be the right way to look for a benefit > from something like this. I think that a better test scenario might > involve figuring out how fast we can recover from a bad situation. As > we've discussed before, if VACUUM is chronically unable to keep up > with the workload, then the system is going to get into a very bad > state and there's not really any help for it. But if we start to get > into a bad situation due to some outside interference and then someone > removes the interference, we might hope that this patch would help us > get back on our feet more quickly. > > For instance, suppose that we have a database with a stale replication > slot, so the oldest-XID value for the cluster keeps getting older and > older. autovacuum is probably running but it can't clean anything up. > Then at some point, the DBA realizes that bad things are happening and > drops the replication slot. You might hope that, with the patch, > autovacuum would do a better job getting the system back to a working > state. If you set up some kind of test scenario, you could ask > questions like "what is the largest age(relfrozenxid) that we observe > in the database at any point during the test?" or "from the time the > replication slot is dropped, how much time passes before > age(datfrozenxid) drops to normal?" or "what is the maximum observed > amount of bloat during the test?".