Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rGLDT-00Eo56-Ar for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Dec 2023 15:44:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rGLDR-00AqZd-Qf for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Dec 2023 15:44:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rGLDR-00AqXW-GW for pgsql-hackers@lists.postgresql.org; Thu, 21 Dec 2023 15:44:05 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rGLDP-00BWNx-3e for pgsql-hackers@lists.postgresql.org; Thu, 21 Dec 2023 15:44:04 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 866DF3200B1E; Thu, 21 Dec 2023 10:44:01 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 21 Dec 2023 10:44:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1703173441; x=1703259841; bh=78K0wg7aTO k6fBSD8YTmmdm9JSluJulJFC0fddXT+9M=; b=aBcqBf+hISQdLwwAY1iPZm+y1b 0hf2DgI1w5u+m5SL5p+k/SaZ7JW/p2qazmPoYaroOLylghMM9WE4WmcUMKEItqv+ l3xQhQju7FHLLTtwq81m4Vx1Lmn2FnS+dwO/yfY6duZ7CsxJnA6PNz8I409gFFso ZTF/WnOIyGMJ2QO/S/f231zwTamDb3wEHGXPp1i41KA10z7UorIlzRbUKxDQN0fJ Jy6yHSRYbGFo43ZKjYKrvDbNz7rpcEhAdO0umNfQTVsyrepR95GBnfw4vFxBSPgW vQ1/Bq921Ah7Ic4zRVMbl/cDcy7BAKyucePE0Pcy+hLkUYJQ7KRxBSgXPJIw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1703173441; x=1703259841; bh=78K0wg7aTOk6fBSD8YTmmdm9JSlu JulJFC0fddXT+9M=; b=LOdEZctIbNI3RMzObQ6PE3pemtfjgasmd7AvR2qKDVII Uedsy15AZw3BwAdteTCCeWqGmqtXfOzGKO9l7kNhtG/7TDJf944g2s51xxxl+yIE rjkzD8X5P9h84w0dRTSygDmw98n9XeWgWOtU4rJrZhgFGcHArpRw3lHr1ozxV3X+ l6e3KSEQx3qFNdKeXnmQ7RDhAEq30+sQvkMx2xTpjnnwvqyydTt+/TRyp0HoVF5B hz0vkdi2v4d2IDshkequVKuVrexc+3kIypm458eNpB+SNSD3lYqSDKHxQMr/U4Zl ctOAnzxkoyOH5nJip/o8DhUc3pNFlXiB2LDCEt5b1w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdduhedgheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfffeevhfetveffgeeiteefhfdtvdffjeevhfeuteegleduheetvedu ieettddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 21 Dec 2023 10:44:00 -0500 (EST) Date: Thu, 21 Dec 2023 07:43:52 -0800 From: Andres Freund To: Tomas Vondra Cc: Robert Haas , PostgreSQL Hackers , Georgios Subject: Re: index prefetching Message-ID: <20231221154352.ijtg6wloa3nowivh@alap3.anarazel.de> References: <8ec36f51-b863-60e3-20e2-b9c981c5ce5e@enterprisedb.com> <06bb7d02-2c44-3062-731e-a735ba13da7e@enterprisedb.com> <367160ea-b1ed-4481-e804-bca509128878@enterprisedb.com> <280dc83c-a16f-4424-1319-95e7e3f798bd@enterprisedb.com> <98ba4b25-fae8-c1f4-1597-8093375a1986@enterprisedb.com> <20231221134314.wf2rs62d37u62j7t@alap3.anarazel.de> 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 Hi, On 2023-12-21 16:20:45 +0100, Tomas Vondra wrote: > On 12/21/23 14:43, Andres Freund wrote: > >> AFAICS this seems similar to some of the AIO patch, I wonder what that > >> plans to do. I need to check. > > > > Yes, most of this exists there. The difference that with the AIO you don't > > need to prefetch, as you can just initiate the IO for real, and wait for it to > > complete. > > > > Right, although the line where things stop being "prefetch" and becomes > "async" seems a bit unclear to me / perhaps more a point of view. Agreed. What I meant with not needing prefetching was that you'd not use fadvise(), because it's better to instead just asynchronously read data into shared buffers. That way you don't have the doubling of syscalls and you don't need to care less about the buffering rate in the kernel. Greetings, Andres Freund