Go back to considering HOT on pages marked full

Enterprise / PostgreSQL - Peter Geoghegan [bowt.ie] - 26 November 2021 18:58 UTC

Commit 2fd8685e7f simplified the checking of modified attributes that takes place within heap_update(). This included a micro-optimization affecting pages marked PD_PAGE_FULL: don't even try to use HOT to save a few cycles on determining HOT safety. The assumption was that it won't work out this time around, since it can't have worked out last time around.

Remove the micro-optimization. It could only ever save cycles that are consumed by the vast majority of heap_update() calls, which hardly seems worth the added complexity. It also seems quite possible that there are workloads that will do worse over time by repeated application of the micro-optimization, despite saving some cycles on average, in the short term.

Author: Peter Geoghegan

1a6f5a0e87 Go back to considering HOT on pages marked full.
src/backend/access/heap/heapam.c | 31 ++++++-------------------------
1 file changed, 6 insertions(+), 25 deletions(-)

Upstream: git.postgresql.org


  • Share