| From: | Melanie Plageman <melanieplageman(at)gmail(dot)com> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Avoid BufferGetPage() calls in heap_update() |
| Date: | 2026-03-15 14:43:43 |
| Message-ID: | E1w1mgw-000IIs-30@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Avoid BufferGetPage() calls in heap_update()
BufferGetPage() isn't cheap and heap_update() calls it multiple times
when it could just save the page from a single call. Do that.
While we are at it, make separate variables for old and new page in
heap_xlog_update(). It's confusing to reuse "page" for both pages.
Author: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAAKRu_a%2BhO4PCptyaPR7AMZd7FjcHfOFKKJT8ouU3KedMud0tQ%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8d2c1df4f4c54d0a73fcabaf5e25bc55ce7fb5fa
Modified Files
--------------
src/backend/access/heap/heapam.c | 17 ++++++++++-------
src/backend/access/heap/heapam_xlog.c | 34 ++++++++++++++++++----------------
2 files changed, 28 insertions(+), 23 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Melanie Plageman | 2026-03-15 15:11:24 | pgsql: Save vmbuffer in heap-specific scan descriptors for on-access pr |
| Previous Message | Melanie Plageman | 2026-03-15 14:15:05 | pgsql: Initialize missing fields in CreateExecutorState() |