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 1w6EsF-0045kY-0B for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Mar 2026 21:37:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w6EsC-00CByc-19 for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Mar 2026 21:37:44 +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 1w6EsC-00CByS-0B for pgsql-hackers@lists.postgresql.org; Fri, 27 Mar 2026 21:37:44 +0000 Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w6Es9-00000001YKt-2vLL for pgsql-hackers@postgresql.org; Fri, 27 Mar 2026 21:37:44 +0000 Received: from phl-compute-11.internal (phl-compute-11.internal [10.202.2.51]) by mailfhigh.phl.internal (Postfix) with ESMTP id B73C014001F2; Fri, 27 Mar 2026 17:37:40 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Fri, 27 Mar 2026 17:37:40 -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=fm1; t=1774647460; x=1774733860; bh=C3IotRRptH2cmzoplqEm+3tdUYtJKc5Y9om+3BgbHTQ=; b= fEVyqqpF+fX2o6Uj9W1Qlqq+6wpWjQopNEWUb2b60R9R7bx07jp4npctrnEDAJhM 9Bd8gXFeevc6LJharcU/mp6bH0ZlhicAUzsTXSSmkmYlZSRKnVwzOxZk8Al0JvN8 TMLQKsa5P7Fr+2C5a9xw56dvsigs09o0DHyviEf+eXyJYXJosY1eJ8BGEqPq8Tzb JbHu3q9Yf8dikWET58miJBIpIERhRe6UCRHYDadeAJamOjBd3H28ZaKBHOfea/ZJ 1GYypgn9iVappuiwZYiz79kIS4QM1NWMaklAW6v0Q4kyE+/cVIuxAV6Rgt10zI+I hZKtuR3pE7wtK+NJgT1YoA== 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=fm1; t=1774647460; x= 1774733860; bh=C3IotRRptH2cmzoplqEm+3tdUYtJKc5Y9om+3BgbHTQ=; b=a 34y52eEIfA8OQjz6c9xw696HeLxzqez7w+isRocaLqZvvAIiL449S9YmfKeWTZjb xtwdipukFIL1ck8AV+jgLruz0Xir/dtB/8NDt8zkMkzoxJlORIjYZgY2YwkNMq7k aAsZAxpQUAPPiZbSJ19mCoFS8rMysBkvwe2J00KWKhoJaIZy3WAM2PsVeueW6Q9R fZlrS1QBiOJXrKLpdN8bAEC6oRlTVUCOvHXnpvbx5YNq18U+EulVyC+piBD1F2L5 VQlZIKs/gZBHoyBx4ViWBWFepGRTJ+MEOY7hs5oDqcLTEkZURN92ZJfDhJoW4j2W iGJd16tVnj6hbWhIbykzQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdeffedufeekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggugfgjsehtkefstddttdejnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpedtleelvdfgjedvffeiueekfeeuleffhfegfffhgfffkeevueehieehhfei gffhvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvgdpnhgspghrtghpthhtohepiedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepphhgsegsohifthdrihgvpdhrtghpthhtohepth hvsehfuhiiiiihrdgtiidprhgtphhtthhopegshigrvhhuiiekudesghhmrghilhdrtgho mhdprhgtphhtthhopehmvghlrghnihgvphhlrghgvghmrghnsehgmhgrihhlrdgtohhmpd hrtghpthhtohepthhhohhmrghsrdhmuhhnrhhosehgmhgrihhlrdgtohhmpdhrtghpthht ohepphhgshhqlhdqhhgrtghkvghrshesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Mar 2026 17:37:39 -0400 (EDT) Date: Fri, 27 Mar 2026 17:37:39 -0400 From: Andres Freund To: Melanie Plageman Cc: 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: <42rdu4q44kvsq53fz5qgzuawqpaytvnemsnquynlfch5mqhc2m@6ytnlgivtzro> 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-27 17:17:25 -0400, Melanie Plageman wrote: > On Fri, Mar 27, 2026 at 1:29 PM Andres Freund wrote: > > > > On 2026-03-26 20:12:30 -0400, Andres Freund wrote: > > > One test used did_io=(t|f). That was actually only needed once "aio: Don't > > > wait for already in-progress IO" is in, as we might join the foreign IO. I > > > chose to hide that by making that part of the query "did_io and not > > > foreign_io", so we would detect if we were to falsely start IO ourselves. > > > > I ended up not liking did_io, as that seems misleading when we just needed to > > wait for a foreign IO. I instead named it io_reqd. > > 0001 looks good to me except I don't get why you are still passing > MAIN_FORKNUM to PrefetchBuffer() in invalidate_one_block() Because I am stupid. > In 0002, the test cases look good to me. I haven't gained more > knowledge about injection point related code since my last review, so > still no comment there (inj_io_completion_hook(), etc). > > I didn't see anything amiss reviewing by eye. Running it through AI, > it suggested that you should clear stdout between test cases in > test_inject_foreign. I think this seems most relevant because in two > back-to-back tests you are looking for the same output pattern. Yea, that's a good call. I'll give the BF a bit more time to digest f39cb8c0110 and then will push 0001/0002. > It also pointed out that there is a pre-existing bug in > inj_io_short_read_hook() where you pass the wrong parameter to the log > message. > > ereport(LOG, errmsg("short read injection point called, is enabled: %d", > inj_io_error_state->enabled_reopen), > errhidestmt(true), errhidecontext(true)); > > should be > > ereport(LOG, errmsg("short read injection point called, is enabled: %d", > inj_io_error_state->enabled_short_read), > errhidestmt(true), errhidecontext(true)); I'll fix this as part of 0002 which touches related code, an injection point debug message fixup doesn't seem to deserve its own commit message. Greetings, Andres Freund