Re: pgstattuple: Use streaming read API in pgstatindex functions

2025-11-05 Thread Xuneng Zhou
Hi, On Thu, Oct 16, 2025 at 6:32 PM wenhui qiu wrote: > > HI Xuneng Zhou > > > - /* Unlock and release buffer */ > > - LockBuffer(buffer, BUFFER_LOCK_UNLOCK); > > - ReleaseBuffer(buffer); > > + UnlockReleaseBuffer(buffer); > > } > The previous suggestion to keep it was based on the fact that the

Re: pgstattuple: Use streaming read API in pgstatindex functions

2025-10-18 Thread Xuneng Zhou
Hi, On Mon, Oct 13, 2025 at 5:42 PM Nazir Bilal Yavuz wrote: > > Hi, > > On Mon, 13 Oct 2025 at 11:42, Xuneng Zhou wrote: > > > > Here is patch v3. The comments have been added, and the extra scope > > ({}) has been removed as suggested. > > Thanks, the code looks good to me! > > The benchmark r

Re: pgstattuple: Use streaming read API in pgstatindex functions

2025-10-18 Thread Xuneng Zhou
Hi Bilal, Thanks for looking into this. On Mon, Oct 13, 2025 at 3:00 PM Nazir Bilal Yavuz wrote: > > Hi, > > Thank you for working on this! > > On Mon, 13 Oct 2025 at 06:20, Xuneng Zhou wrote: > > > > Fix indentation issue in v1. > > I did not look at the benchmarks, so here are my code comment

Re: pgstattuple: Use streaming read API in pgstatindex functions

2025-10-17 Thread Xuneng Zhou
Hi Wenhui, Thanks for looking into this. On Mon, Oct 13, 2025 at 5:41 PM wenhui qiu wrote: > > Hi Xuneng Zhou > > > > - /* Unlock and release buffer */ > > - LockBuffer(buffer, BUFFER_LOCK_UNLOCK); > > - ReleaseBuffer(buffer); > > + UnlockReleaseBuffer(buffer); > > } > Thanks for your patch! J

Re: pgstattuple: Use streaming read API in pgstatindex functions

2025-10-17 Thread Xuneng Zhou
Hi, On Mon, Oct 13, 2025 at 10:07 AM Xuneng Zhou wrote: > > Hi hackers, > > While reading the code related to streaming reads and their current > use cases, I noticed that pgstatindex could potentially benefit from > adopting the streaming read API. The required change is relatively > simple—simi

Re: pgstattuple: Use streaming read API in pgstatindex functions

2025-10-17 Thread wenhui qiu
HI Xuneng Zhou > - /* Unlock and release buffer */ > - LockBuffer(buffer, BUFFER_LOCK_UNLOCK); > - ReleaseBuffer(buffer); > + UnlockReleaseBuffer(buffer); > } The previous suggestion to keep it was based on the fact that the original code already had a similar comment. In fact, the code itself is

Re: pgstattuple: Use streaming read API in pgstatindex functions

2025-10-13 Thread wenhui qiu
Hi Xuneng Zhou > - /* Unlock and release buffer */ > - LockBuffer(buffer, BUFFER_LOCK_UNLOCK); > - ReleaseBuffer(buffer); > + UnlockReleaseBuffer(buffer); > } Thanks for your patch! Just to nitpick a bit — I think this comment is worth keeping, even though the function name already conveys its

Re: pgstattuple: Use streaming read API in pgstatindex functions

2025-10-13 Thread Nazir Bilal Yavuz
Hi, Thank you for working on this! On Mon, 13 Oct 2025 at 06:20, Xuneng Zhou wrote: > > Fix indentation issue in v1. I did not look at the benchmarks, so here are my code comments. - I would avoid creating a new scope for the streaming read. While it makes the streaming code easier to interpre

Re: pgstattuple: Use streaming read API in pgstatindex functions

2025-10-13 Thread Nazir Bilal Yavuz
Hi, On Mon, 13 Oct 2025 at 11:42, Xuneng Zhou wrote: > > Here is patch v3. The comments have been added, and the extra scope > ({}) has been removed as suggested. Thanks, the code looks good to me! The benchmark results are nice. I have a quick question about the setup, if you are benchmarking

pgstattuple: Use streaming read API in pgstatindex functions

2025-10-12 Thread Xuneng Zhou
rom 153ab2799803dc402789d0aa825456ea12f2d3d9 Mon Sep 17 00:00:00 2001 From: alterego655 <[email protected]> Date: Sun, 12 Oct 2025 21:27:22 +0800 Subject: [PATCH] pgstattuple: Use streaming read API in pgstatindex functions Replace synchronous ReadBufferExtended() loops with the streaming read API in pgstatindex_i