Andres Freund <[email protected]> wrote: > On 2026-01-12 12:45:03 -0500, Andres Freund wrote: > > I'm doing another pass through 0003 and will push that if I don't find > > anything significant. > > Done, after adjust two comments in minor ways.
I suppose this is commit 0b96e734c590. While troubleshooting REPACK issue [1], I realized that HeapTupleSatisfiesMVCCBatch() can also be called during logical decoding - in that case we need to use a historic MVCC snapshot. My proposal to fix the problem is attached. [1] https://www.postgresql.org/message-id/CADzfLwWNv5QDn6qmxCRV-p_ijSTGwNcEZFCOXt09+RmpSG2=+w...@mail.gmail.com -- Antonin Houska Web: https://www.cybertec-postgresql.com
diff --git a/src/backend/access/heap/heapam_visibility.c b/src/backend/access/heap/heapam_visibility.c index 75ae268d753..685a938bd68 100644 --- a/src/backend/access/heap/heapam_visibility.c +++ b/src/backend/access/heap/heapam_visibility.c @@ -1628,7 +1649,7 @@ HeapTupleSatisfiesMVCCBatch(Snapshot snapshot, Buffer buffer, bool valid; HeapTuple tup = &batchmvcc->tuples[i]; - valid = HeapTupleSatisfiesMVCC(tup, snapshot, buffer); + valid = HeapTupleSatisfiesVisibility(tup, snapshot, buffer); batchmvcc->visible[i] = valid; if (likely(valid))
