pgsql: Adjust HeapTupleSatisfies* routines to take a HeapTuple.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Adjust HeapTupleSatisfies* routines to take a HeapTuple.
Date: 2013-07-22 17:42:23
Message-ID: E1V1K7r-0007dS-On@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/0518eceec3a1cc2b71da04e839f05f555fdd8567

Modified Files
--------------
contrib/pgrowlocks/pgrowlocks.c | 2 +-
src/backend/access/heap/heapam.c | 13 +++++---
src/backend/access/heap/pruneheap.c | 17 ++++++++--
src/backend/catalog/index.c | 2 +-
src/backend/commands/analyze.c | 3 +-
src/backend/commands/cluster.c | 2 +-
src/backend/commands/vacuumlazy.c | 13 +++++---
src/backend/executor/nodeBitmapHeapscan.c | 1 +
src/backend/storage/lmgr/predicate.c | 2 +-
src/backend/utils/time/tqual.c | 50 +++++++++++++++++++++++------
src/include/utils/snapshot.h | 4 +--
src/include/utils/tqual.h | 20 ++++++------
12 files changed, 91 insertions(+), 38 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2013-07-22 19:15:53 pgsql: Remove bgw_sighup and bgw_sigterm.
Previous Message Alvaro Herrera 2013-07-22 17:19:09 pgsql: Silence compiler warning on an unused variable