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 1nLADq-0005xA-2U for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Feb 2022 20:51:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nLADo-0004FV-Lu for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Feb 2022 20:51:20 +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 1nLADo-0004FD-AB for pgsql-hackers@lists.postgresql.org; Fri, 18 Feb 2022 20:51:20 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nLADk-0001ee-US for pgsql-hackers@postgresql.org; Fri, 18 Feb 2022 20:51:19 +0000 Received: by mail-pl1-x636.google.com with SMTP id z17so8065398plb.9 for ; Fri, 18 Feb 2022 12:51:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/PjLDZa/tRB1xxyQE35HyopKe7qddSvDC/TAy9Cg82Y=; b=FI3lw/+CRDlBh6nKJUip4kzf+tXI8kAiV3MhKxb/gFHVxu/oj3DlsUOZ8aQDV3H556 yAO8hUOtaeuHIH9YkyS7P/nVjneeZ/kl3JdPmb0g7oHKyS2o6F9ZHwYh8LP0Lskk5IzT QTh4BevjOyXpEZILnupm8cIlgTwZkpDOA1jogiM2PbKygXpw8hCz7DqxbK2WO5eUlfPv 18t8AptAs7CNEnB7xG5th2Ya2SZGBH8tcHd24gaT4Gdd9d644qNM2VFV1Kusl/5880oH WuEMWyGyyfFi33hkH0dowPAzDn5e38s4nRNrHw5VoAooSCKQcI86w8qiuNtqTPyUYeIR Dawg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/PjLDZa/tRB1xxyQE35HyopKe7qddSvDC/TAy9Cg82Y=; b=x+BiaaMAdoSa2c4oM4kZSg3IwNg1rTHrJj1lnkoVKFqkkOEJI01RfwZfmQro6g9+qO 6fKszCRdQh8C5i2eTWYMMW3nEFjgQLUVWa7Xu8ZbRHLkp7G67HNPeLpjp86S5UFRDb1b lkyg/ygrU3ny+O6zo525ccZ5dDk9s1r3cSQ4eqAr08f2R9Wty/Yd9j/d+Ugu96KuxqsI MO8jwSWAKR5lLAh5FeyU0DR5VrBhUh5qUWzH1ctKbaZ3bsOv1nOKYNM6i6NqcO4kOnfW GE1XSZY5hC16dmPfBQePXdPTrME/tfOtS6mIcAAhPkRxygDh84qbcTY4BuPWFCFifQVu GO5w== X-Gm-Message-State: AOAM532KzguOCs8pvsKA+rhlXZgkJ7m8ei5I3+KtMPbGTTS7CF6B5icZ p0Ct2fruGvTN88KVaTDoCn4= X-Google-Smtp-Source: ABdhPJxavw3RbfC/La4XALPMnTylhYCKKMtoG2cTv6HpBbfENJeT143h0KqgbmLVe5CgmyYbQfpUUA== X-Received: by 2002:a17:903:1210:b0:14e:e194:2f2c with SMTP id l16-20020a170903121000b0014ee1942f2cmr9070811plh.130.1645217474428; Fri, 18 Feb 2022 12:51:14 -0800 (PST) Received: from nathanxps13 ([50.54.155.70]) by smtp.gmail.com with ESMTPSA id z14sm3985769pfe.30.2022.02.18.12.51.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 12:51:13 -0800 (PST) Date: Fri, 18 Feb 2022 12:51:11 -0800 From: Nathan Bossart To: Andres Freund Cc: "Bossart, Nathan" , Bharath Rupireddy , Maxim Orlov , Amul Sul , Bruce Momjian , Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: O(n) tasks cause lengthy startups and checkpoints Message-ID: <20220218205111.GA3447220@nathanxps13> References: <20220217015052.2y3wxibeommk37ey@alap3.anarazel.de> <20220217041404.GA3243546@nathanxps13> <20220217065938.x2esfdppzypegn5j@alap3.anarazel.de> <20220217182337.GA3247866@nathanxps13> <20220217192709.eyf2cnymhxqsals7@alap3.anarazel.de> <20220217210022.GA3248793@nathanxps13> <20220217222829.lndzwq72fh4v34c2@alap3.anarazel.de> <20220217225838.GA3292179@nathanxps13> <20220217231247.llfqjvvuk6rkawel@alap3.anarazel.de> <20220218164454.GA3403811@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220218164454.GA3403811@nathanxps13> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Thu, Feb 17, 2022 at 03:12:47PM -0800, Andres Freund wrote: >>> > The improvements around deleting temporary files and serialized snapshots >>> > afaict don't require a dedicated process - they're only relevant during >>> > startup. We could use the approach of renaming the directory out of the way as >>> > done in this patchset but perform the cleanup in the startup process after >>> > we're up. BTW I know you don't like the dedicated process approach, but one improvement to that approach could be to shut down the custodian process when it has nothing to do. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com