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 1w6Azj-0041ro-3B for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Mar 2026 17:29:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w6Azi-00B5Du-1n for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Mar 2026 17:29:14 +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.96) (envelope-from ) id 1w6Azh-00B5Dm-0N for pgsql-hackers@lists.postgresql.org; Fri, 27 Mar 2026 17:29:14 +0000 Received: from fout-b7-smtp.messagingengine.com ([202.12.124.150]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w6Aza-00000001M6a-3iwz for pgsql-hackers@postgresql.org; Fri, 27 Mar 2026 17:29:12 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.stl.internal (Postfix) with ESMTP id 84C341D0027E; Fri, 27 Mar 2026 13:29:05 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Fri, 27 Mar 2026 13:29:05 -0400 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=fm1; t=1774632545; x=1774718945; bh=tFfq3VowuP EUQ3jtyfawce0H+xBcJzp10MDSu4Qqgz0=; b=Pk6YRoNW+ypl5I7zhsan7K14dz 2uoJ1DuaxPcd6XMWb2+BXgwM7S+h5ziOf7qBWtXTebrH/a4/Bfb77588gNkSNY/W ms3fcRse3RERqEHgGaseREdhtNSYkT0KchO11NuUU1qpwFrgoQglZpQbbaki9vh/ AJdtcmmez4rW2dvqAkO6/9nxvptpjAE4eqst9SSruW0+BGGea6oUqq4bfCKH3ZQl 5gjHxrkThHKz9bjRkdlZp68qRSI0EDDckrwV9dwMcounSs+8+RpKviVP9QX6176D Vr0bvNRK22lfUJgl4lAdW22gf0k3/ZvPp1JMkajHxVwXXeQqSqqhMp02XrJw== 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=fm1; t= 1774632545; x=1774718945; bh=tFfq3VowuPEUQ3jtyfawce0H+xBcJzp10MD Su4Qqgz0=; b=IxW5AckU52I2uOJlsjPU9wTk+Y4FbTEhXjhhw7XtpPdoXhRSr0V m4D9A/IY58lLrPJFixuuVDID3ZQgCUhrPv9kxh9s51r+nhmtqy8PjNo3t03g/lZZ 72jN53Pxsd8dDDQT2s8FdTYQrc8/Xu4Yx9WKmklYvl6fzI3hMt0ZoqOA7aVA58KT 3F8d9KBxVOQZuu0dlKhzbdMw0Sbt8GHmtYDDcWqtZQ52xdmVUKWxRhixLh1tsGDp N+HkzJOfPUsRwl0Q7AySdwhXn/aZZW87IZ4L5PeCV9+TMXugfYlA06VPdiZECgCO N7sSzJZgLaTdXYF/kpU9uhh/vGdrngZoKZA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdeffedtkeekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggujgesmhdtsfertddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnhepfeefudejgffghfegheduffduieejgedtkeejhfevieevgeekgeekleeljeef keeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hnughrvghssegrnhgrrhgriigvlhdruggvpdhnsggprhgtphhtthhopeeipdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehpghessghofihtrdhivgdprhgtphhtthhopehtvh esfhhuiiiihidrtgiipdhrtghpthhtohepsgihrghvuhiikedusehgmhgrihhlrdgtohhm pdhrtghpthhtohepmhgvlhgrnhhivghplhgrghgvmhgrnhesghhmrghilhdrtghomhdprh gtphhtthhopehthhhomhgrshdrmhhunhhrohesghhmrghilhdrtghomhdprhgtphhtthho pehpghhsqhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Mar 2026 13:29:04 -0400 (EDT) Date: Fri, 27 Mar 2026 13:29:03 -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: multipart/mixed; boundary="4bovv3espbe3a3ho" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --4bovv3espbe3a3ho Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, I think I forgot to update the thread in my last message to note that I had committed some of the preliminary changes. 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. > Still need to extend the test as part of the "don't wait" commit, to actually > ensure that we reach the path for joining foreign IO. That's done now. I've added verification that we don't wrongly recognize in-progress-ios without a wref as a foreign IO and an injection point based test that verifies that we do see the foreign IO. I've also done a bunch of cleanup in the commits. A few typos in commit messages and the actual code changes and a few larger changes in the test code & infrastructure. Mostly as part of allowing the aforementioned testing (read_buffers() now only waits at the end, to make some of the tests possible), but also just making the modified code a bit cleaner. Greetings, Andres Freund --4bovv3espbe3a3ho Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v9-0001-test_aio-Add-basic-tests-for-StartReadBuffers.patch"