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 1oziuo-0005tE-4s for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Nov 2022 18:31:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oziun-0001Nt-00 for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Nov 2022 18:31:37 +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 1ozium-0001Nj-NI for pgsql-hackers@lists.postgresql.org; Mon, 28 Nov 2022 18:31:36 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oziuk-00020K-7L for pgsql-hackers@postgresql.org; Mon, 28 Nov 2022 18:31:35 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id C3F8B320092E; Mon, 28 Nov 2022 13:31:31 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 28 Nov 2022 13:31:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1669660291; x=1669746691; bh=kRYjLTVejE 8eK8d12qE5GtjWGq3xWizo03rw8NvPUHE=; b=pGfz2UYYwC84gVJGzVLg2XX++G lV9OfKTGMN6vRzZi9zCYoyFLCNHkTs95tPx5HNHLgZC2VU3NOSLqJ7MyrbAC8Ahh y0I34/8XzKS3JT1tLPdK2yLcO2Y/sX+73GAXtGMqgLJC0g2e5bpGTtnjeEi6xNS5 My5L8gvWH+cdkL36IMqJMq6wDDK905D2Pf3PAS3zknF1WcDkUx/ZcEvxm6dS+W/A yu9UC4hFkeibDKek0BZvg2xIFsZx3MnRI/V19nIoSqPJV67H6lHbq2cOaDoD2Dte wiqATvFKYefh0qGVs88EkePSEc2Q4DqIdTeW2dOQ9gWAs1zbw3xXCX1/Kuzg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1669660291; x=1669746691; bh=kRYjLTVejE8eK8d12qE5GtjWGq3x Wizo03rw8NvPUHE=; b=waavbygAapw9q8u4ymF6saW0VGRbrSowy8aQXpimeSVb eGCOSDrXiKKhN4bbRP8SF3HIJfD8/u6czuj+wFua6iQS7QRlvr99Jc3xcTlJlVXo jPXB0paOTIUko2MfoWY62GEBeRoo4dJu0mdoVPEky3PkfZrT/ontwDHsgT8KHpO4 FEWhwf5yUFmzEyivkos9nQqJpqlWfHFpvqUMibyXxaldPHPswlaVS3SZHZeLzuJZ +aVvDYd+iONMdo+NlOBS+1wcFPdVvfnVLUuMhmyJ19s1hWpxVHifoAPUWabmOJFM XqVR1Q6+cVk/jAJwJHs2k+N/QQvZAgDLOoDGTW++Tw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrjedvgdduudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfffeevhfetveffgeeiteefhfdtvdffjeevhfeuteegleduheetvedu ieettddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 28 Nov 2022 13:31:30 -0500 (EST) Date: Mon, 28 Nov 2022 10:31:29 -0800 From: Andres Freund To: Simon Riggs Cc: Nathan Bossart , Robert Haas , "Bossart, Nathan" , Bharath Rupireddy , Maxim Orlov , Amul Sul , Bruce Momjian , "pgsql-hackers@postgresql.org" Subject: Re: O(n) tasks cause lengthy startups and checkpoints Message-ID: <20221128183129.ip3g5vrcbjrngpp2@awork3.anarazel.de> References: <20220706165110.GB2135371@nathanxps13> <20220811230921.GA1707962@nathanxps13> <20220824164624.GA1302727@nathanxps13> <20220902220744.GA1261322@nathanxps13> <20220923174154.GA1111614@nathanxps13> <20221106223842.GA620653@nathanxps13> <20221124001907.GA576983@nathanxps13> <20221127233434.GA878043@nathanxps13> 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 On 2022-11-28 13:08:57 +0000, Simon Riggs wrote: > On Sun, 27 Nov 2022 at 23:34, Nathan Bossart wrote: > > > Rather than explicitly use DEBUG1 everywhere I would have an > > > #define CUSTODIAN_LOG_LEVEL LOG > > > so we can run with it in LOG mode and then set it to DEBUG1 with a one > > > line change in a later phase of Beta > > > > I can create a separate patch for this, but I don't think I've ever seen > > this sort of thing before. > > Much of recovery is coded that way, for the same reason. I think that's not a good thing to copy without a lot more justification than "some old code also does it that way". It's sometimes justified, but also makes code harder to read (one doesn't know what it does without looking up the #define, line length).