On Fri, Aug 7, 2026 at 11:20 AM Jingtang Zhang <[email protected]> wrote:
>
> One question: are there general guidelines for keeping argument counts
> low in hot PostgreSQL functions, or is this mainly assessed case by case?

We don't worry about it unless it is the bottleneck in some workload
-- like if you have a workload where you can notice a performance
improvement by changing the number of arguments. The
StartReadBuffersImpl() thing came about when we committed the read
stream code and someone noticed regressions for fully cached
sequential scans as compared to without the read stream code. The read
stream adds its own overhead, so Andres/Thomas/Bilal and others
embarked on a journey to try to win back performance for that use case
by chipping away at various things guided by careful profiling and
benchmarking.

- Melanie


Reply via email to