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 1pOp4D-0007Zs-6F for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Feb 2023 00:09:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pOp3D-0005kb-N2 for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Feb 2023 00:08:03 +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 1pOp3D-0005kR-9E for pgsql-hackers@lists.postgresql.org; Mon, 06 Feb 2023 00:08:03 +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 1pOp3A-0007Ps-AJ for pgsql-hackers@lists.postgresql.org; Mon, 06 Feb 2023 00:08:01 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 93DE6320029B; Sun, 5 Feb 2023 19:07:58 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 05 Feb 2023 19:07:59 -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=fm3; t=1675642078; x=1675728478; bh=WvptvYULrP xzxVzlNIbNabKnmzL1FEM8GdEaP7JLGeY=; b=XMc2+hpfFTg+I8mVDCmsbto9df BZhApScnuvXhoLoscJCKYonDFxYHjiOdLTdxf0Xypujk/oTWhJ8IAnkEjRde9Zx+ NMfOGFmxDykEtZnSlg3SFBK6azDbTZDe5phGmcFeZ9bh5DAMTAtgqnuZCA5je+Bc NtW2NDxju6uEu5cTZ1WmGpj5/xlYP2WiZRilevMN99oXYgq77B9JnafinOSoM5qX ovf7nWIn+eOzKCguu872R/UBwjpj8uCsg4omLMdTvxy2/mUtVT3S27HZ3IdWjm0X j+q5dkJ6wLtgtnNSXVNY3rF6cKUoTqMUe4HrYbtNajRJBnxucMuRD7CvHsNw== 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= fm3; t=1675642078; x=1675728478; bh=WvptvYULrPxzxVzlNIbNabKnmzL1 FEM8GdEaP7JLGeY=; b=mi4JENcA4FIHGKrKKI/YToXJKbdOJiXqXjiLYZk28wyZ Qna3xpDrtZpuEc/RwqAI6jBwDg1Kg7ZyCOdCbJWMKJbVsgWe4R4aXh/mo/uWLmB4 uly8B1KGM69zE3IkXarJZRYoB0HHSzgQJj4kStYSgeuTkjvJ/yiMq379jzMEifd8 2aZnwakpbEgU7M5itSBSgr8a5j3VYZSpl2yg0hUMxSC5CbGpwFMAFeJ1Y2BYTOOf lOV0Tcrue9QNXv3yxhPDkvWeZbWJIzfYiPOEaEe3dFqQs8dI9ELSfvdmjmwSxxc7 K6rHlPo0ZhR5tDxNxqRI3/vMesySY9dd20jR7VwI0g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeghedgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfffeevhfetveffgeeiteefhfdtvdffjeevhfeuteegleduheetvedu ieettddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 5 Feb 2023 19:07:56 -0500 (EST) Date: Sun, 5 Feb 2023 16:07:50 -0800 From: Andres Freund To: Nathan Bossart Cc: Michael Paquier , Tom Lane , Thomas Munro , Fujii Masao , Postgres hackers Subject: Re: Weird failure with latches in curculio on v15 Message-ID: <20230206000750.ohqjmbfo3trtwvhc@alap3.anarazel.de> References: <20230201165801.33ydbxvjdbomjqa7@alap3.anarazel.de> <20230201175806.GA3199959@nathanxps13> <20230201223555.GA3721373@nathanxps13> <20230204113029.xlcqrbxhp6lerrnc@alap3.anarazel.de> <20230204180354.GA258107@nathanxps13> <20230205221938.GA274245@nathanxps13> <20230205230157.45kl5gqryupzdoyb@alap3.anarazel.de> <20230205235747.GA275913@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230205235747.GA275913@nathanxps13> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2023-02-05 15:57:47 -0800, Nathan Bossart wrote: > > For the segment files, we'd likely need a parameter to indicate whether > > the restore is random or not. > > Wouldn't this approach still require each module to handle restoring ahead > of time? Yes, to some degree at least. I was just describing a few pretty obvious improvements. The core code can make that a lot easier though. The problem of where to store such files can be provided by core code (presumably a separate directory). A GUC for aggressiveness can be provided. Etc. > I agree that the shell overhead isn't the main performance issue, > but it's unclear to me how much of this should be baked into > PostgreSQL. I don't know fully either. But just reimplementing all of it in different modules doesn't seem like a sane approach either. A lot of it is policy that we need to solve once, centrally. > I mean, we could introduce a GUC that tells us how far ahead to > restore and have a background worker (or multiple background workers) > asynchronously pull files into a staging directory via the callbacks. > Is that the sort of scope you are envisioning? Closer, at least. Greetings, Andres Freund