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 1v6Xqg-006DeG-Ot for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Oct 2025 17:21:10 +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 1v6Xqd-00Bon9-Uw for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Oct 2025 17:21:08 +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.94.2) (envelope-from ) id 1v6Xqd-00Bon1-GJ for pgsql-hackers@lists.postgresql.org; Wed, 08 Oct 2025 17:21:08 +0000 Received: from fout-b3-smtp.messagingengine.com ([202.12.124.146]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1v6XqX-000hoH-0D for pgsql-hackers@postgresql.org; Wed, 08 Oct 2025 17:21:07 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id 3D47B1D004CC; Wed, 8 Oct 2025 13:21:01 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Wed, 08 Oct 2025 13:21:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm3; t=1759944061; x= 1760030461; bh=8H/l/MB97eBJOhWT7U+lnf4YpWFHgI64n8igfIuLfBg=; b=N zwU4XwfRretTbQCM0m1Babcvdyd+n9ToTLFtetlLXwtL0QfVby9oC4ci818kYuha gXdDNe2Anhl4zpWVT5eMDooo83LVUhryNsa1ZcA5/IR3M1TQjDyDWfBITMRNaYDb OP1T1VyVWsaoapsl87GsMTv86QqKlLXnZsQrxHT/W7qtEJoMrh3QWjAqra8VdEw5 4KLUU1wRK5O8+rdrDwoC0JYuUkS7Mqfczfg8Hc2usos5pYhtCv/Biitqk5CHM9o+ PwcR2IPBVuLdHuK6UEpTvSc/kp2nGY/MQfZuimtp+bi3hI5r34w3V8Fi+ZJ4q0IE +PrkQOCQZfea2/8/1Ehpw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1759944061; x=1760030461; bh=8 H/l/MB97eBJOhWT7U+lnf4YpWFHgI64n8igfIuLfBg=; b=ALpufwbiJmsfqU1l3 XoqyiJceJqTCTFupygHxh4QHJ3fdxXd4uYlpR07whbIwHF+J3bUQcHLAs+1qhA8q /ZVfR+3SiOevU0KB50NQivW0vhbcZ9rl7FN5MoB5rooJ1eCGABmqIiRut0MrSZgP PO6aCLwYU+yYYZ7ntaHTdna58dHB7erP8pv35/oIQ5uj2pFSN18smzLEU0dsGcZh dSGXyuLtWEJfMr2inUZLNiBrJkw8JAMq8kVVrkQhdAOXrOShV49N11ZhNEBg17tQ lMuBoqUfqqW2q+Kro2yKIT86nGnwDYdwKGdTtIU9nclWm87AzFKu3u9IQpCFrBuv tKiMQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddutdefkeekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheplmhlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvqeenucggtf frrghtthgvrhhnpeetuedvheffkeevgfeuheevteevkefggedttdeufeeuheduuddthfef fffhjeefffenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgv sehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopehnrghthhgrnhgusghoshhsrghrthesghhmrghilhdrtghomhdp rhgtphhtthhopehsrghmihhmshgvihhhsehgmhgrihhlrdgtohhmpdhrtghpthhtohepph hgshhqlhdqhhgrtghkvghrshesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 8 Oct 2025 13:21:00 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1759944058; bh=oW9QQlNdl+LnTRuP/Lej+rdd7dbE/IR2N3pzD/CZavM=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=I+5cyVrkqallIPWKkFf94MBT1z2qFtFqZZDrf4G7vEkzjO+cM/Jlpy/cjFVGPb+pz qS+w7Nbbmya73L/XHhhe01v9irAAg2xbFt8UjBn2iuwpaCFGJdUpSeXx1pstElWGhW rNqt/PvPA59SDGMTSvArBv8s81C/sZZS+dopASHezQKviEgnVgHWfw14EJb2grjvyr L7WIw2egOFEv7VVoUk8exRCcMHp6gzYrlWIEOTjbCYR4RjkCCZO6Ps188mwf1cr22N zTMTNnPo4XK3xzuFFCD9RrnqWkTU06exCMzVDR+vmTSuBoPAmVF1oa7X4DSgyBdvCr ZYtPthXw8tkJQ== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 818AA78; Wed, 08 Oct 2025 19:20:58 +0200 (CEST) Date: Wed, 8 Oct 2025 19:20:58 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Sami Imseih Cc: Nathan Bossart , pgsql-hackers@postgresql.org Subject: Re: another autovacuum scheduling thread Message-ID: <202510081715.pk3ue2cwchy3@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-Oct-08, Sami Imseih wrote: > One risk I see with this approach is that we will end up autovacuuming > tables that also take the longest time to complete, which could cause > smaller, quick-to-process tables to be neglected. Perhaps we can have autovacuum workers decide on a mode to use at startup (or launcher decides for them), and use different prioritization heuristics depending on the mode. For instance if we're past max freeze age for any tables then we know we have to first vacuum tables with higher MXID ages regardless of size considerations, but if there's at least one worker in that mode then we use the mode where smaller high-churn tables go first. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "No nos atrevemos a muchas cosas porque son difíciles, pero son difíciles porque no nos atrevemos a hacerlas" (Séneca)