Re: Moving _bt_readpage and _bt_checkkeys into a new .c file - Mailing list pgsql-hackers

From Victor Yegorov
Subject Re: Moving _bt_readpage and _bt_checkkeys into a new .c file
Date
Msg-id CAGnEbojqEodxtJpk-m0LoJbj8U6d2goHhMkVvnKYFU_bsGA4Lw@mail.gmail.com
Whole thread Raw
In response to Moving _bt_readpage and _bt_checkkeys into a new .c file  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers
сб, 6 дек. 2025 г. в 06:49, Peter Geoghegan <pg@bowt.ie>:
Attached patch v1-0001-* moves _bt_readpage (from nbtsearch.c) and
_bt_checkkeys (from nbtutils.c) into a new .c file -- nbtreadpage.c.
It also moves all of the functions that _bt_checkkeys itself calls
(either directly or indirectly) over to nbtreadpage.c. This first
patch is strictly mechanical, in that it only moves existing functions
around, without directly changing anything.



This seems like an enhancement that is pretty easy to justify. Note
that the changes in the second patch essentially restore things to how
they already were prior to my commit 763d65ae. I doubt that that
change caused a regression at the time, since the speedup that I see
now depends on the changes in the first patch (though I must admit
that I haven't benchmarked the changes made by the second patch in
isolation).

Hey.

I like this change and I agree that it's both handy and gives an easy performance boost.

Patch applies and compiles cleanly. I can barely see a performance boost on my end (VM on a busy host), round 1%, but I still consider this change beneficial.

--
Victor Yegorov

pgsql-hackers by date:

Previous
From: Bilal Yavuz
Date:
Subject: Re: Speed up COPY FROM text/CSV parsing using SIMD
Next
From: Alexander Lakhin
Date:
Subject: Re: increased duration of stats_ext tests with -DCLOBBER_CACHE_ALWAYS