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 1pj55G-0007Rm-A9 for pgsql-hackers@arkaria.postgresql.org; Sun, 02 Apr 2023 21:17:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pj55E-0004OP-9h for pgsql-hackers@arkaria.postgresql.org; Sun, 02 Apr 2023 21:17:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pj55D-0004OF-Uu for pgsql-hackers@lists.postgresql.org; Sun, 02 Apr 2023 21:17:52 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pj559-000Vt1-5M for pgsql-hackers@postgresql.org; Sun, 02 Apr 2023 21:17:49 +0000 Received: by mail-pj1-x1031.google.com with SMTP id fy10-20020a17090b020a00b0023b4bcf0727so28581685pjb.0 for ; Sun, 02 Apr 2023 14:17:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680470264; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=OTw1wtdrNFd0GiLIw5btZ3ehiYF47rmGnBPCp7d8k8c=; b=P1z2KBwq4r28HostJW4PrhWvZfeKbYkyFsZHR5x7PIQNxjL0EwyjLHY6Jc1q3vm1z8 5x+L01gtw4HG4H9Rb8eiQdtVwJDwycxAP727zSRvQn2TfllbDLwxE7vvgbLfz9dzozJw wJMXn3mKiMyOeV3NwRmBSU9mv4K+Us9Yh9TdXppifHSYXIvTLdwvs0OvI3Su4nsmBNNb xLORKZuu9OQN6vuc1C1SbJ7TlCwzDfh5aBDDBUX7mQpGuzQcBSYYDJPjHV7Jx2d3k9jV 4bWiH5NFB6yrVOzhN+E36lLoVSDW9YorPqXVea9LM+/75N+DaZG8KyXvtqy6z5Am6ZuG V6Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680470264; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=OTw1wtdrNFd0GiLIw5btZ3ehiYF47rmGnBPCp7d8k8c=; b=q0eopwXO+AwLVtPc46dA3sPDPX1Ykk/1fphqV3rYRiXsuRCiC/d+IOXsiwbr965uBo ocipPkh2KInjRkm/nq0GWodF+UnRnvRgzZgU8KpUiJVm9+nvtFAatS6VP4WgBp2m+uEO u32p7Ook8Q3dSrC3yOnW0f9KuRb7izs5FXC07j5uLqkW/iD4r49X1ydDui6pLZ/q8Xdn XsDCVeXaeAGoC43I8iSGDN8dO+1Vas6u419cwVHxAdnquQ8j3BjOxMGAtP8cH9y0Gylk wp70ObSeK2ozXbcCZF8ytfLXqRFFCz4pOnXxuqqSxOcbQMofmeopUIWvNQM1JvOzYlzg ddKA== X-Gm-Message-State: AO0yUKWiuT3E+IuHa1ZXVhmLSNZxaK5ZEVyvwaJaWqrapSzkNzSta7vm TIUrNRG34/cszt7cHh4pJds= X-Google-Smtp-Source: AK7set8v0R5NUlqAoFCe5dvXafN7+a6KeJS23thKlzVA7w3yzEBnScNHnczPRqc2GIsH8Hzokrrwew== X-Received: by 2002:a05:6a20:b23:b0:d9:f086:e754 with SMTP id x35-20020a056a200b2300b000d9f086e754mr28356157pzf.46.1680470264583; Sun, 02 Apr 2023 14:17:44 -0700 (PDT) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id g25-20020aa78759000000b0062dee0221b2sm4161021pfo.21.2023.04.02.14.17.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Apr 2023 14:17:44 -0700 (PDT) Date: Sun, 2 Apr 2023 14:17:42 -0700 From: Nathan Bossart To: Tom Lane 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 Message-ID: <20230402211742.GA27239@nathanxps13> References: <20221201214026.GA1799688@nathanxps13> <20221202191507.GA2277157@nathanxps13> <20230203054808.GA83788@nathanxps13> <20230217234344.GA3357392@nathanxps13> <1031491.1680457205@sss.pgh.pa.us> <20230402193030.GA25018@nathanxps13> <1056498.1680466985@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1056498.1680466985@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Apr 02, 2023 at 04:23:05PM -0400, Tom Lane wrote: > 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. Alright. I'll change this. >>> * 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. Yeah. I should probably tackle that one first and leave the logical tasks for later, given there is some prerequisite work required. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com