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.96) (envelope-from ) id 1w7e9Z-005Ycm-0R for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2026 18:49:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7e9X-00CTWa-0r for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2026 18:49:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w7e9W-00CTWR-1m for pgsql-hackers@lists.postgresql.org; Tue, 31 Mar 2026 18:49:27 +0000 Received: from fhigh-a3-smtp.messagingengine.com ([103.168.172.154]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w7e9S-00000002DjY-3prg for pgsql-hackers@postgresql.org; Tue, 31 Mar 2026 18:49:26 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.phl.internal (Postfix) with ESMTP id 0226F14001F5; Tue, 31 Mar 2026 14:49:21 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Tue, 31 Mar 2026 14:49:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-transfer-encoding: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=1774982960; x=1775069360; bh=yhW2J3GCB8oH+/fBpXUJHCe0GymVd6k6sKEnP3JUJb8=; b= WkrWjA7645qFxEbA2jr7GoJxOtwvG70XLaRY4uM1OscWh6nYrDcUbxdR3OyfXCxc hEXRDISlakBZi31DN+fK/eV8+BWwwrP2ykuX/oqHn+nawqURbd/YjoFSdUDKtTbg C3B8ankF2+PlH/tKuDP3O1ckjxc55ozMBvVJmEJA5aR4RC06WmrhWBEcjvuYGRUz Rzk8R2NV2R3i4OgZnS/IPTMXSJ74vdVTz+jGjRa32iw04HvysQ1WIriDYOFqzlw/ zId9bH9yZ4jDMVYtADx2UkMqYY2DXeTvO/IdPZfis6ZYHEicaHfBnf2W3StfDFYq ldGZo7rpEnRYP4u5+iDhug== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=fm2; t=1774982960; x= 1775069360; bh=yhW2J3GCB8oH+/fBpXUJHCe0GymVd6k6sKEnP3JUJb8=; b=u 9gXtm7d6m7/M5fiobxzm56+PTP8XlHRdlShd/+NSTJxb6EDAjcv35Qo6u8yYQ9Xi rjtl+lzJHqieHdus7wJixo4wJj1gZTs07v4Rpg3yS88nIfvg3xM+UhJGehmzNsQq X1Jf6vpuHILeScGYxlgYe6Nq7RIPxuNrsi8Xdn0uGazIuqlIqHh1VsAnL6n9TK1l yJsDvclGQ/GoLTPg1Q0a58IM0XyssPYcWJcoCn1QRNqsBwp7NZvKaPqhUoYqse7U L5D/dLKbcaBKaXUrnPtXjURq/WCuSFm7xI8Z1A7WAVy8Xt4KmJ6yLzlSOO3fmiIQ A6S6HM7b1gZyE1b7B1ATQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdeliecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegrihhl ohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpe ffhffvvefukfhfgggtugfgjgestheksfdttddtjeenucfhrhhomheptehnughrvghsucfh rhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrthhtvg hrnheptdelledvgfejvdffieeukeefueelfffhgeffhffgffekveeuheeihefhiefghfdv necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghnug hrvghssegrnhgrrhgriigvlhdruggvpdhnsggprhgtphhtthhopeejpdhmohguvgepshhm thhpohhuthdprhgtphhtthhopehpghessghofihtrdhivgdprhgtphhtthhopehtvhesfh huiiiihidrtgiipdhrtghpthhtohepsgihrghvuhiikedusehgmhgrihhlrdgtohhmpdhr tghpthhtohepvgigtghluhhsihhonhesghhmrghilhdrtghomhdprhgtphhtthhopehmvg hlrghnihgvphhlrghgvghmrghnsehgmhgrihhlrdgtohhmpdhrtghpthhtohepthhhohhm rghsrdhmuhhnrhhosehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtg hkvghrshesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 31 Mar 2026 14:49:19 -0400 (EDT) Date: Tue, 31 Mar 2026 14:49:19 -0400 From: Andres Freund To: Melanie Plageman Cc: Alexander Lakhin , Nazir Bilal Yavuz , Thomas Munro , pgsql-hackers@postgresql.org, Peter Geoghegan , Tomas Vondra Subject: Re: Don't synchronously wait for already-in-progress IO in read stream Message-ID: References: <9ce8f5d8-8ab2-4aa2-b062-c5d74161069c@gmail.com> <6yhrh2q7tb2fxszsyjg34uzt66ejbbk4j6tmwov6xaezunzvxx@ghohuopucefv> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2026-03-31 14:25:49 -0400, Melanie Plageman wrote: > On Tue, Mar 31, 2026 at 8:43 AM Andres Freund wrote: > > > > Looks good to me. > > > > Will you push? > > I was going to push but then Bilal asked me off-list if there was some > reason not to set the members of ReadBuffersOperation outside of > assert builds. I agree with him that it seems like a future user of > StartReadBuffersImpl() could make this same mistake. Both of us > vaguely recall this being done for performance reasons. Before > committing this test change, I wanted to confirm that we don't want to > modify the actual prod code the way he does in [1]. I'd be wary of doing that without performance validation. My memory of the read stream introduction is that it was pretty hard to not regress the fully cached path, and that relatively small additions showed up. But I do agree it'd be nicer if they were valid. So I'd be inclined to push your fix for now. Greetings, Andres Freund