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 1thTt4-002xhE-He for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Feb 2025 13:31:47 +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 1thTt3-001KSN-2v for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Feb 2025 13:31:45 +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 1thTt1-001KSF-Pg for pgsql-hackers@lists.postgresql.org; Mon, 10 Feb 2025 13:31:44 +0000 Received: from fhigh-b8-smtp.messagingengine.com ([202.12.124.159]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1thTsz-00028t-1x for pgsql-hackers@postgresql.org; Mon, 10 Feb 2025 13:31:42 +0000 Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfhigh.stl.internal (Postfix) with ESMTP id 7D7A725400FB; Mon, 10 Feb 2025 08:31:40 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Mon, 10 Feb 2025 08:31:40 -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=fm3; t=1739194300; x=1739280700; bh=k7ixDzSP7b 0NvCTfw7VUNEXYkl/Hjdc3KUzybdKlrBU=; b=Ls+ieglAqNsyzBKw3QB/LO0XAD 7a0HPMgw9BcfH+PKLiFcWO5iDo9UVHRAYYFzpoXZsoGtAFM/CAbZ9xyaJ6EXNXi9 +FIZ/m4HL/F3YTnS4Xq1dfrpNGRo5LlxSe7WhM9gWk+qECCS3Wl+bfYESdTXQts1 eD/OQrddEMHhqW2DLWxS4vVeHtjESX3HvCZwx4MEAOCBwD7DbORtcVD9h5LZj/m3 4Fbv0OUcJ8eoocJV6GErbsB14T51rYZ5tvIoPs+uIsbi6tMvRZnxQl9A/owmKwl2 aruMJOleTQb/CtJvO7UTUMTdENZIPzCqIJrocgWzn0KMjJOlSKT81u7mlQUw== 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-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1739194300; x=1739280700; bh=k7ixDzSP7b0NvCTfw7VUNEXYkl/Hjdc3KUz ybdKlrBU=; b=nDUkkoH0RcXtgGVGlYZe/fAkiPb+aINeA4IP4alU9eyuJp8V68s p0yj6s69BnVoA5g2EsQodpalcS+ocuNLz70l/mTeuojXB2XfOxaZSeUFYDzGztq+ 3GViB6uyUx3mcklG0rj4afQvboERwiHpChPcthubddl1PjQmtfPsil6t0l8ClTFi ehVgEjJpTOwrH4IEg3svT25+BHZCTsUIYIKbNcCgz0vLRCuTbbJWUxeI+oLV41xT UiT6GczZUsj3X9eOVUEDjHh9XsMsy6KaTaY5fZhEz4HE1/U1NyiawTPFGxBWjaVX Y7oPPZQlzwF92RELfeAj0FBeCIKW4LEzviw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdefkedukecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpeffhffvvefukfhfgggtuggjsehttdfstddttddv necuhfhrohhmpeetnhgurhgvshcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgrii gvlhdruggvqeenucggtffrrghtthgvrhhnpeeffffgledvffegtdevlefgtdeggffhvdek gfegteeiveejkeetudelveejhfeugeenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghlrdguvgdpnhgspghr tghpthhtohepiedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprhhjuhhjuhduvd efsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhoshhtghhrvghssehjvghlthgvfhdr nhhlpdhrtghpthhtohepsghruhgtvgesmhhomhhjihgrnhdruhhspdhrtghpthhtohepth horhhikhhoshhhihgrsehoshhsrdhnthhtuggrthgrrdgtohhmpdhrtghpthhtohepphhg shhqlhdqhhgrtghkvghrshesphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepth hglhesshhsshdrphhghhdrphgrrdhush X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 10 Feb 2025 08:31:39 -0500 (EST) Date: Mon, 10 Feb 2025 08:31:38 -0500 From: Andres Freund To: Jelte Fennema-Nio Cc: Tom Lane , torikoshia , pgsql-hackers@postgresql.org, rjuju123@gmail.com, Bruce Momjian Subject: Re: RFC: Allow EXPLAIN to Output Page Fault Information Message-ID: References: <1f22794321b745549d54359d343e37b8@oss.nttdata.com> <2c9d6eaf26df17bec13bb03bf1e9bcbb@oss.nttdata.com> <2035079.1739124342@sss.pgh.pa.us> 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 2025-02-09 21:06:02 +0100, Jelte Fennema-Nio wrote: > On Sun, 9 Feb 2025 at 19:05, Tom Lane wrote: > > > > Andres Freund writes: > > > I'm somewhat against this patch, as it's fairly fundamentally incompatible > > > with AIO. There's no real way to get information in this manner if the IO > > > isn't executed synchronously in process context... > > Hmm, I had not considered how this would interact with your AIO work. > I agree that getting this info would be hard/impossible to do > efficiently, when IOs are done by background IO processes that > interleave IOs from different queries. But I'd expect that AIOs that > are done using iouring would be tracked correctly without having to > change this code at all (because I assume those are done from the > query backend process). > > One other thought: I think the primary benefit of this feature is > being able to see how many read IOs actually hit the disk, as opposed > to hitting OS page cache. That benefit disappears when using Direct > IO, because then there's no OS page cache. > > How many years away do you think that widespread general use of > AIO+Direct IO is, though? I think it'll always be a subset of use. It doesn't make sense to use DIO for a small databases or untuned databases. Or a system that's deliberately overcommmitted. But this will also not work with AIO w/ Buffered IO. Which we hope to use much more commonly. If suddenly I have to reimplement something like this to work with worker based IO, it'll certainly take longer to get to AIO. Greetings, Andres Freund