Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msYWj-0001Iz-Tl for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Dec 2021 22:56:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1msYWi-0000hN-OH for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Dec 2021 22:56:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msYWi-0000h4-Ei for pgsql-hackers@lists.postgresql.org; Wed, 01 Dec 2021 22:56:36 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msYWg-0006GF-Ca for pgsql-hackers@postgresql.org; Wed, 01 Dec 2021 22:56:35 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id AEDDA5C013E; Wed, 1 Dec 2021 17:56:33 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 01 Dec 2021 17:56:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=X8UhpnRKCZsMBDjfnO5wTtS1Jfw H8RmMDxQKkzSIehw=; b=d59MnTpkCTWpCE3OWyDO28ictYCXH/tcuWZ/4dDCE8J cATjPgTiQ4GrANxlH6WIrYLeBcUl6dGHtwPFXY01+wYfFOlzfF6wl8mR5LDxfgBb ol2gefeyAKiqfIf6hVXMDYQDpA6ka39vxE2zauJMJ0ODPakvgsHU2lvrcL1KHuVf MuqZW6F1s+1UdkwUK50KXL539XOKTkfaUaEZkHcJfz4MzStwnUljZEUFCyOWDlEu nBtZRo39bmgceMHHvo1Bqm+cweLozt2lfN2Ngz2htNCwvsD08p1lVZWlP7gOun1C 2OvsMQSlkLVbHYxx1ZtE3F+EMet+5VHByBRJPw/vX0Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=X8Uhpn RKCZsMBDjfnO5wTtS1JfwH8RmMDxQKkzSIehw=; b=gLGoTTPDSjEv1bqRC8JqyH 1h8uZQYUb9g0uuxABYm41CbKEPCqT50uXmpdI/RwnCHf3CtouqnCKN4WrkxyRlu4 uWJm5wO1iMGkBxYlh6FAIai4KhlzJA9KTZtTFYTyMVUQUiuAc29iAesVawcH02Xg ot88pPI1wz8acvPiSMisjI3JpRynzlODi+EtrNTF9OxPY9rjbjuCRedqzTzbINR7 hbnnjnsfdKdsN8O0qJCH1tbFZprP3ztdz8jnmx3cnj/vs7wkAN4zUr1HC+6mypmj n1KQfvVO3X0dcdBDbnDcJCc1hxU1KLjCLLioaXDw4/f+AJz+/Jabp3bli2eqZNxw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrieeggddtgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnhepudekhfekleeugeevteehleffffejgeelueduleeffeeutdelffeujeffhfeu ffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 Dec 2021 17:56:33 -0500 (EST) Date: Wed, 1 Dec 2021 14:56:32 -0800 From: Andres Freund To: "Bossart, Nathan" Cc: "pgsql-hackers@postgresql.org" Subject: Re: O(n) tasks cause lengthy startups and checkpoints Message-ID: <20211201225632.wrbrrofm4cbxvnqw@alap3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2021-12-01 20:24:25 +0000, Bossart, Nathan wrote: > I realize adding a new maintenance worker might be a bit heavy-handed, > but I think it would be nice to have somewhere to offload tasks that > really shouldn't impact startup and checkpointing. I imagine such a > process would come in handy down the road, too. WDYT? -1. I think the overhead of an additional worker is disproportional here. And there's simplicity benefits in having a predictable cleanup interlock as well. I think particularly for the snapshot stuff it'd be better to optimize away unnecessary snapshot files, rather than making the cleanup more asynchronous. Greetings, Andres Freund