Avoid BufferGetPage() calls in heap_update()
Melanie Plageman <melanieplageman@gmail.com>
Author:
Melanie Plageman <melanieplageman@gmail.com>
Date: 2026-03-15T14:42:34Z
Releases:
19 (unreleased)
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@gmail.com> Discussion: https://postgr.es/m/CAAKRu_a%2BhO4PCptyaPR7AMZd7FjcHfOFKKJT8ouU3KedMud0tQ%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/heap/heapam.c | modified | +10 −7 |
| src/backend/access/heap/heapam_xlog.c | modified | +18 −16 |
Discussion
- eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access) 168 messages · 2025-06-23 → 2026-04-21