]> granicus.if.org Git - postgresql/commit
Adjust HeapTupleSatisfies* routines to take a HeapTuple.
authorRobert Haas <rhaas@postgresql.org>
Mon, 22 Jul 2013 17:26:33 +0000 (13:26 -0400)
committerRobert Haas <rhaas@postgresql.org>
Mon, 22 Jul 2013 17:38:44 +0000 (13:38 -0400)
commit0518eceec3a1cc2b71da04e839f05f555fdd8567
treed35c1107e52c8f5e92edf4022430e544d0dfb763
parent0aeb5ae2041520f02cabbc7083aec46733689bce
Adjust HeapTupleSatisfies* routines to take a HeapTuple.

Previously, these functions took a HeapTupleHeader, but upcoming
patches for logical replication will introduce new a new snapshot
type under which the tuple's TID will be used to lookup (CMIN, CMAX)
for visibility determination purposes.  This makes that information
available.  Code churn is minimal since HeapTupleSatisfiesVisibility
took the HeapTuple anyway, and deferenced it before calling the
satisfies function.

Independently of logical replication, this allows t_tableOid and
t_self to be cross-checked via assertions in tqual.c.  This seems
like a useful way to make sure that all callers are setting these
values properly, which has been previously put forward as
desirable.

Andres Freund, reviewed by Álvaro Herrera
12 files changed:
contrib/pgrowlocks/pgrowlocks.c
src/backend/access/heap/heapam.c
src/backend/access/heap/pruneheap.c
src/backend/catalog/index.c
src/backend/commands/analyze.c
src/backend/commands/cluster.c
src/backend/commands/vacuumlazy.c
src/backend/executor/nodeBitmapHeapscan.c
src/backend/storage/lmgr/predicate.c
src/backend/utils/time/tqual.c
src/include/utils/snapshot.h
src/include/utils/tqual.h