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 1w1Ljw-000E6u-1m for pgsql-hackers@arkaria.postgresql.org; Sat, 14 Mar 2026 09:57:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w1Lju-001W2n-0Z for pgsql-hackers@arkaria.postgresql.org; Sat, 14 Mar 2026 09:56:58 +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 1w1Ljt-001W2d-1Y for pgsql-hackers@lists.postgresql.org; Sat, 14 Mar 2026 09:56:58 +0000 Received: from fout-a1-smtp.messagingengine.com ([103.168.172.144]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w1Ljk-000000005bP-2xEb for pgsql-hackers@lists.postgresql.org; Sat, 14 Mar 2026 09:56:57 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id 9940DEC05BA; Sat, 14 Mar 2026 05:56:47 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Sat, 14 Mar 2026 05:56:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; 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=1773482207; x=1773568607; bh=pVu9UCZzlh 361liwTuY+kNMoffljvs+fwKm+5Nt0vu4=; b=dGQBhop7N7NkM4jI/u8bF+ca7q XzWSNaLHvwrc4MJLfDcrVXRJRBw6iLK8W6A+4ETItPt4sIw4azwpUeesDtH+j0Dr wEbtH3PqPwWSql/2gkiYMxj3xC3qwjs8BDtJmbI++1SGWZYmo+L2CNXSJ/RrAHLY fKWuWujeuc4AFKSCrE1LYh3bXGJVlzxQgnZsIR+FwJ5h/C6/609WwKMAmKjGBVkl lkbFi1VA1/i+xPdDRVFWipxGQOuM6+K2UXh1M3RmK+e84/VyFy/nZqIt2MfLLIDq L5UJNcC+/1WXVSKw/NDBXhs3U5mUVhewWhqdjk0Qs7eaqDLDUN7ClFdiIgaw== 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= 1773482207; x=1773568607; bh=pVu9UCZzlh361liwTuY+kNMoffljvs+fwKm +5Nt0vu4=; b=uYkuA9liYb6Emyp9FiUBWzrvU2lv8arj25/RNCE+/NCvNqFvE39 Qvg7hqLaPAjkzSfDpKoIpBIYvzjPIlIdPo4/XP04DPWTGm+sVApkvsHD9Q8SfORY BESnYHjOkKVukgpVi0/VUeTLE+vdtXQzKh3+MWjATO/UmD995IsnhTYwEBCaSCKA HhtGi73MHrIWXhDS6tmNK1keD+8ekkVwgD/k4ipbUDNN8FEs4khOm4NY/wGuK/dz wNJMjSB6/FVgxbxJCSD8JMRuDy9i3Qb/4eX0x1WB/PxvJym5jR2mw7EAMqk9Snjv xfevmM5jSq189POQs1bMuy7kO+qXXdiXDWQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvledvvdeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeggeeg fffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepgihunh gvnhhgiihhohhusehgmhgrihhlrdgtohhmpdhrtghpthhtoheprghnughrvghssegrnhgr rhgriigvlhdruggvpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtsh drphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepsgihrghvuhiikedusehgmhgr ihhlrdgtohhm X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 14 Mar 2026 05:56:45 -0400 (EDT) Date: Sat, 14 Mar 2026 18:56:39 +0900 From: Michael Paquier To: Xuneng Zhou Cc: Andres Freund , pgsql-hackers , Nazir Bilal Yavuz Subject: Re: Streamify more code paths Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="N+cJVj+aF55lIEmZ" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --N+cJVj+aF55lIEmZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 13, 2026 at 10:39:52AM +0800, Xuneng Zhou wrote: > Thanks for fixing this and for taking the time to review and test > the patches. Looking at the rest, I have produced some numbers: pgstattuple_small (20k tuples, io_uring) base=3D 60839.9ms patch=3D10949.9ms 5.56x ( 82.0%) (reads=3D4139->260, io_time=3D49616.97->55.25ms) pgstattuple_small (20k tuples, worker=3D3) base=3D 60577.5ms patch=3D11470.0ms 5.28x ( 81.1%) (reads=3D4139->260, io_time=3D49359.79->69.60ms) hash_vacuum (1M tuples, io_uring) base=3D199929.0ms patch=3D161747.0ms 1.24x ( 19.1%) (reads=3D4665->1615, io_time=3D47084.8->9925.77ms)=20 hash_vacuum (1M tuples, worker=3D12) base=3D203417.0ms patch=3D161687.0ms 1.26x ( 20.5%) (reads=3D4665->1615, io_time=3D48356.3->9917.24ms)=20 The hash vacuum numbers are less amazing here than yours. Trying out=20 various configurations does not change the results much (I was puzzled for a couple of hours that I did not see any performance impact but forgot the eviction of the index pages from the shared buffers, that influences the numbers to what I have here), but I'll take it anyway.=20 One thing that I was wondering for the pgstattuple patch is if we should have "scanned" put outside the private data of the callback as we get back to the main loop once we know that the page is not all-visible, so we could increment the counter in the main loop instead of the callback. Now I get that you have done that as it feels cleaner for the "default" return path of the callback, while the logic remains the same, so I have kept it as-is at the end, tweaked a few things, and applied this one. I have not been able to review yet the patch for the hash VACUUM proposal, which would be the last one. -- Michael --N+cJVj+aF55lIEmZ Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmm1MNcACgkQnvQgOdby QH3HJw//Y+0iU/BkBmDqJOoC4cpSOb/g0SuohE7W0CcizaGM6/O6l0Bc8qOolMDS xgGO4K2N0JtjD4f5W+seNeORmqpHzKKET6c5tdOJBelxf0gIEMd/CUSdS1xtkJ3G TotwbBpKgu8rsj4rfdDnFnDfP/9qZq86WqddV3z+AxhDq4MtBUndBwdYTV73L2CT Llez2QYrs7nCvyTx0T9eQXI+E/j3pelPyjZ35wFHTulrQGFXCggom2uc22BoKjl6 KX3js4uUf8zUFSjgjw71TGuIUO0PZqs4rAfaSoidBSQnla24A15192U1rpLnZwph 2ek4gLGqVBo3CAjpozxtHzzVV7tfHbnb6UTvRhUUgulZnhuqk46ScHt9sakOxzIS ykQtofKoicOd11+2/VdPxJljYl8P7VhxvMCVgx13DiXvjUeTy2SH6qJ8h4vynOXG eWcgm02Lp5r7G7pzlQZAKwxO42QH8bX4/cvK9nG/NZGpfieYZ5fsoiXhPp8dE8kP /lXFPp+Bp2H/C2oS9hdvuegOTRmsqvKU7rvCrO9K0A9aDd+y1wBKvo1ohhW5qJOU GHmnyGpNLEVFdnXgyLXPB6WtHr1LsgOc7hf1zEQpImGYvbEjrGsSl2Q5RAvvnJrD a75TRhzm92h9SvCe7M55x+8Ve3b3PDLLDagb3GdaiLjBoNwJJ6E= =Ab/S -----END PGP SIGNATURE----- --N+cJVj+aF55lIEmZ--