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.94.2) (envelope-from ) id 1vC2ER-008CCd-8l for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Oct 2025 20:48:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1vC2EP-00Bk5B-2D for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Oct 2025 20:48:20 +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.94.2) (envelope-from ) id 1vC2EO-00Bk4n-OL for pgsql-hackers@lists.postgresql.org; Thu, 23 Oct 2025 20:48:19 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vC2EL-003s6r-2G for pgsql-hackers@postgresql.org; Thu, 23 Oct 2025 20:48:19 +0000 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-b403bb7843eso263002166b.3 for ; Thu, 23 Oct 2025 13:48:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761252497; x=1761857297; 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=S5AJ5hiruftHErNwiEo4+qs+EA8Q0zFafMxMQ2k+xR8=; b=V2LUlisWum9P+Xowk2XpMOPtQBprP+iu1yRDi9L4eZnLBLBIOv3WHyShVhUMoYXQBM Z30WMmRGarmGkbNwmo/OcSUWS6EbAyFOMW4ubdpao5DzkQbTCGJrahrQ8jP2Q/KKSOM9 RPpEqcZWA68QkYLCXDFh18Z4tjFhCJj+pvOVFUr+3LQYuKNTA5Q3ZyvA28xne1nku43d J9GSTxStlD/AfFlRsUMk7DEZ1HMcuGHlvLwUpVZjJMMq1/dqEPy7gr/JTc4zDqHPqtlW NoBRr1dKHfSfRsvr8h8POy4ilMYVNNYbebFty6TUPdE7Cd5tLigO5l0kcUVcXUVWKary uVUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761252497; x=1761857297; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=S5AJ5hiruftHErNwiEo4+qs+EA8Q0zFafMxMQ2k+xR8=; b=nE8tDK30hzuxZrl3fyso9IEw6Cqmb2ViCzJNQ1GQvZ9v9KowrOashgbYVVZ/Qn1TXU +OMpmGqc6Jgf7AQzMBG1UXRuyrA38xBbkhxsaKC+YecMI7zMn8oQL/OFNve/OlUSHwTH 5iMjo9LMs7DDZjmWNBY48G7ba4G3bdumO6F1sP63EhPpDxwPGmKJl4ZVCNiOHpY0GJvQ n8pV8KUKCWeN+tcbdA/BWApv5JvJEZNkjc9zj5DLjr6CVHDTdorRYoFHMuXtDh4KYZBc MrFs7caOkXPPrCUJq/hQXFbjJC9ej2kaoYzQUwLXh9QeaZMKb+yvb9JoZ7yPae84/uKL HrKg== X-Forwarded-Encrypted: i=1; AJvYcCXsa6ckhRaBZLT3VnXYPnASOT6CTi2FzxVSP0LBq9C2xMZHglXEuQFVpm7K626pDftTItCBQO35K569KBgp@postgresql.org X-Gm-Message-State: AOJu0YxMr139q6f41WT3F86l8tabZf6QZH1PeYwgJ/DQs+L8ZTSIOxcW pqswELwdcm7mK5ZSnhCsefpyvRbrrvTXeJN6QiHkGqUBpBdsn/nRpFvJWpl7K7hSFcmK0Qqx9Hu f0IKmLljNzPPCBiIa4WYHpU058MXbRwU= X-Gm-Gg: ASbGnctoOsLwQuYyzOdTQLLKCUiy4T2PtQT7Yvb0qam5d7qKpHr8eHadcMDkq6Ugolz t9dQosuqZapBRdYow21Owl/AgkxccirpWggOagH/y1FiDJ2Y7odyVMUNOTO6P/LOYF2BBxdU/9L MyNoqNqy4Zq9xCNjsBplU0eoS4SqL5kZunj88Plu6cela0O/InARIDY3zEL+EY2Z1Sy8wbFRCC/ IKnaMRxpFiaZv1FsQacQR7tsqJflVA7a8LUy0qgS3hYX1fubaeJpVAp30v+xXa+jd2bJx4= X-Google-Smtp-Source: AGHT+IG5I4WQ6FWzH622bocelYWfLc7X+SNHIHKsyAcfjUSH5EqRKHYpsIGird0elurfghYyolbAiilkwMZsREyCXoA= X-Received: by 2002:a17:907:a909:b0:b40:b54d:e666 with SMTP id a640c23a62f3a-b647235eeb8mr3375163366b.16.1761252496563; Thu, 23 Oct 2025 13:48:16 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Sami Imseih Date: Thu, 23 Oct 2025 15:48:05 -0500 X-Gm-Features: AWmQ_bnzmbuHDDV1HtQxWJ4et4QYO9slfKDvAn5bUyboV4De4-ultkXaEsNr2T8 Message-ID: Subject: Re: another autovacuum scheduling thread To: David Rowley Cc: Nathan Bossart , Robert Haas , 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, 24 Oct 2025 at 08:33, Sami Imseih wrote: > > Yeah, you=E2=80=99re correct, the list already exists; sorry I missed t= hat. My > > main concern is > > the additional overhead of the sort operation, especially if we have > > many eligible > > tables and an aggressive autovacuum_naptime. > > It is true that there are reasons that millions of tables could > suddenly become eligible for autovacuum work with the consumption of a > single xid, but I imagine sorting the list of tables is probably the > least of the DBAs worries for that case as sorting the > tables_to_process list is going to take a tiny fraction of the time > that doing the vacuum work will take. Yes, in my last reply, I did indicate that the sort will likely not be the operation that will tip the performance over, but the catalog scan itself that I have seen not scale well as the number of relations grow ( in cases of thousands or hundreds of thousands of tables). If we are to prioritize vacuuming by M(XID), then it will be hard to avoid = the catalog scan anymore in a future improvement. >TBH, I think that mindset has likely contributed quite a > bit to the fact that we've made about zero improvements in this area > despite nobody thinking that nothing needs to be done. I am not against this idea, just thinking out loud about the high relation cases I have seen in the past. -- Sami