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 1pj4ET-00051y-HT for pgsql-hackers@arkaria.postgresql.org; Sun, 02 Apr 2023 20:23:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pj4ER-0002bm-Rs for pgsql-hackers@arkaria.postgresql.org; Sun, 02 Apr 2023 20:23:19 +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 1pj4ER-0002bd-Id for pgsql-hackers@lists.postgresql.org; Sun, 02 Apr 2023 20:23:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pj4EL-0003CC-4Z for pgsql-hackers@postgresql.org; Sun, 02 Apr 2023 20:23:18 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 332KN5F11056499; Sun, 2 Apr 2023 16:23:05 -0400 From: Tom Lane To: Nathan Bossart cc: Bharath Rupireddy , Robert Haas , Andres Freund , "Bossart, Nathan" , Maxim Orlov , Amul Sul , Bruce Momjian , "pgsql-hackers@postgresql.org" Subject: Re: O(n) tasks cause lengthy startups and checkpoints In-reply-to: <20230402193030.GA25018@nathanxps13> References: <20221130051833.GB1677223@nathanxps13> <20221201214026.GA1799688@nathanxps13> <20221202191507.GA2277157@nathanxps13> <20230203054808.GA83788@nathanxps13> <20230217234344.GA3357392@nathanxps13> <1031491.1680457205@sss.pgh.pa.us> <20230402193030.GA25018@nathanxps13> Comments: In-reply-to Nathan Bossart message dated "Sun, 02 Apr 2023 12:30:30 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1056497.1680466985.1@sss.pgh.pa.us> Date: Sun, 02 Apr 2023 16:23:05 -0400 Message-ID: <1056498.1680466985@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > On Sun, Apr 02, 2023 at 01:40:05PM -0400, Tom Lane wrote: >> * Why does LookupCustodianFunctions think it needs to search the >> constant array? > The order of the tasks in the array isn't guaranteed to match the order in > the CustodianTask enum. Why not? It's a constant array, we can surely manage to make its order match the enum. >> * The original proposal included moving RemovePgTempFiles into this >> mechanism, which I thought was probably the most useful bit of the >> whole thing. I'm sad to see that gone, what became of it? > I postponed that based on advice from upthread [1]. I was hoping to start > a dedicated thread for that immediately after the custodian infrastructure > was committed. FWIW I agree that it's the most useful task of what's > proposed thus far. Hmm, given Andres' objections there's little point in moving forward without that task. regards, tom lane