pgsql: heap pruning: Only call BufferGetBlockNumber() once.

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: heap pruning: Only call BufferGetBlockNumber() once.
Date: 2022-01-17 23:38:42
Message-ID: E1n9baE-0006NM-Dj@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c702d656a28386cf5f642206b495c66775afc4ea

Modified Files
--------------
src/backend/access/heap/pruneheap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2022-01-17 23:48:02 pgsql: tests: Consistently use pg_basebackup -cfast --no-sync to accele
Previous Message Thomas Munro 2022-01-17 22:08:10 Re: pgsql: Test replay of regression tests, attempt II.