pgsql: heapam: Move logic to handle HEAP_MOVED into a helper function

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: heapam: Move logic to handle HEAP_MOVED into a helper function
Date: 2025-12-19 19:00:10
Message-ID: E1vWfhx-001dg3-0H@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

heapam: Move logic to handle HEAP_MOVED into a helper function

Before we dealt with this in 6 near identical and one very similar copy.

The helper function errors out when encountering a
HEAP_MOVED_IN/HEAP_MOVED_OUT tuple with xvac considered current or
in-progress. It'd be preferrable to do that change separately, but otherwise
it'd not be possible to deduplicate the handling in
HeapTupleSatisfiesVacuum().

Reviewed-by: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Discussion: https://postgr.es/m/lxzj26ga6ippdeunz6kuncectr5gfuugmm2ry22qu6hcx6oid6@lzx3sjsqhmt6
Discussion: https://postgr.es/m/6rgb2nvhyvnszz4ul3wfzlf5rheb2kkwrglthnna7qhe24onwr@vw27225tkyar

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/548de59d93d5593d5ef5354241510d57b68959db

Modified Files
--------------
src/backend/access/heap/heapam_visibility.c | 293 ++++++----------------------
1 file changed, 61 insertions(+), 232 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2025-12-21 04:38:37 pgsql: Clean up test_cloexec.c and Makefile.
Previous Message Andres Freund 2025-12-19 18:28:13 pgsql: bufmgr: Optimize & harmonize LockBufHdr(), LWLockWaitListLock()