Re: pgstattuple: Use streaming read API in pgstatindex functions - Mailing list pgsql-hackers

From Shinya Kato
Subject Re: pgstattuple: Use streaming read API in pgstatindex functions
Date
Msg-id CAOzEurTcFR3Vvz5Z0wFkFqrVRzZG=U4rNuQDVytL2CO1RCAR6Q@mail.gmail.com
Whole thread Raw
In response to Re: pgstattuple: Use streaming read API in pgstatindex functions  (Xuneng Zhou <xunengzhou@gmail.com>)
Responses Re: pgstattuple: Use streaming read API in pgstatindex functions
List pgsql-hackers
Hi,

On Wed, Oct 15, 2025 at 10:25 AM Xuneng Zhou <xunengzhou@gmail.com> wrote:
Hi,

Here’s the updated summary report(cold cache, fragmented index), now including results for the streaming I/O + io_uring configuration.

image.png


Thank you for the additional tests. I can see the image on Gmail, but I cannot on pgsql-hackers archive [0], so it might be a good idea to attach it and not to paste it on the body.

I saw the patch and have a few minor comments.

+ p.current_blocknum = 1;

To improve readability, how about using the following, which is consistent with nbtree.c [1]?
p.current_blocknum = BTREE_METAPAGE + 1;

Similarly, for hash index:
p.current_blocknum = HASH_METAPAGE + 1;

+ /* Unlock and release buffer */
  UnlockReleaseBuffer(buf);

I think this comment is redundant since the function name UnlockReleaseBuffer is self-explanatory. I suggest omitting it from pgstathashindex and removing the existing one from pgstatindex_impl.



--
Best regards,
Shinya Kato
NTT OSS Center
Attachment

pgsql-hackers by date:

Previous
From: Akshay Joshi
Date:
Subject: Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement
Next
From: Bertrand Drouvot
Date:
Subject: Re: Question about InvalidatePossiblyObsoleteSlot()