diff options
author | Robert Haas <rhaas@postgresql.org> | 2013-07-22 13:26:33 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2013-07-22 13:38:44 -0400 |
commit | 0518eceec3a1cc2b71da04e839f05f555fdd8567 (patch) | |
tree | d35c1107e52c8f5e92edf4022430e544d0dfb763 /src/backend/executor/nodeBitmapHeapscan.c | |
parent | 0aeb5ae2041520f02cabbc7083aec46733689bce (diff) | |
download | postgresql-0518eceec3a1cc2b71da04e839f05f555fdd8567.tar.gz postgresql-0518eceec3a1cc2b71da04e839f05f555fdd8567.zip |
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
Diffstat (limited to 'src/backend/executor/nodeBitmapHeapscan.c')
-rw-r--r-- | src/backend/executor/nodeBitmapHeapscan.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/executor/nodeBitmapHeapscan.c b/src/backend/executor/nodeBitmapHeapscan.c index bbb89e69962..45292b26333 100644 --- a/src/backend/executor/nodeBitmapHeapscan.c +++ b/src/backend/executor/nodeBitmapHeapscan.c @@ -258,6 +258,7 @@ BitmapHeapNext(BitmapHeapScanState *node) scan->rs_ctup.t_data = (HeapTupleHeader) PageGetItem((Page) dp, lp); scan->rs_ctup.t_len = ItemIdGetLength(lp); + scan->rs_ctup.t_tableOid = scan->rs_rd->rd_id; ItemPointerSet(&scan->rs_ctup.t_self, tbmres->blockno, targoffset); pgstat_count_heap_fetch(scan->rs_rd); |