heap pruning: Only call BufferGetBlockNumber() once.

Andres Freund <andres@anarazel.de>

Commit: c702d656a28386cf5f642206b495c66775afc4ea
Author: Andres Freund <andres@anarazel.de>
Date: 2022-01-17T23:35:11Z
Releases: 15.0
heap pruning: Only call BufferGetBlockNumber() once.

BufferGetBlockNumber() is not that cheap and obviously cannot change during
one heap_prune_page(), so only call it once. We might be able to do better and
pass the block number from the caller, but that'd be a larger change...

Discussion: https://postgr.es/m/20211211045710.ljtuu4gfloh754rs@alap3.anarazel.de

Files

PathChange+/−
src/backend/access/heap/pruneheap.c modified +2 −1

Discussion