From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Rejigger materializing and fetching a HeapTuple from a slot.
Date: Thu, 15 Nov 2018 22:39:02 +0000
Message-ID: <E1gNQHu-0001xj-R4@gemulon.postgresql.org> (raw)
Rejigger materializing and fetching a HeapTuple from a slot.
Previously materializing a slot always returned a HeapTuple. As
current work aims to reduce the reliance on HeapTuples (so other
storage systems can work efficiently), that needs to change. Thus
split the tasks of materializing a slot (i.e. making it independent
from the underlying storage / other memory contexts) from fetching a
HeapTuple from the slot. For brevity, allow to fetch a HeapTuple from
a slot and materializing the slot at the same time, controlled by a
parameter.
For now some callers of ExecFetchSlotHeapTuple, with materialize =
true, expect that changes to the heap tuple will be reflected in the
underlying slot. Those places will be adapted in due course, so while
not pretty, that's OK for now.
Also rename ExecFetchSlotTuple to ExecFetchSlotHeapTupleDatum and
ExecFetchSlotTupleDatum to ExecFetchSlotHeapTupleDatum, as it's likely
that future storage methods will need similar methods. There already
is ExecFetchSlotMinimalTuple, so the new names make the naming scheme
more coherent.
Author: Ashutosh Bapat and Andres Freund, with changes by Amit Khandekar
Discussion: https://postgr.es/m/20181105210039.hh4vvi4vwoq5ba2q@alap3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/763f2edd92095b1ca2f4476da073a28505c13820
Modified Files
--------------
contrib/postgres_fdw/postgres_fdw.c | 5 +-
src/backend/commands/copy.c | 4 +-
src/backend/commands/createas.c | 2 +-
src/backend/commands/matview.c | 5 +-
src/backend/commands/trigger.c | 46 ++++++++++++------
src/backend/executor/execMain.c | 2 +-
src/backend/executor/execReplication.c | 4 +-
src/backend/executor/execSRF.c | 2 +-
src/backend/executor/execTuples.c | 85 ++++++++++++++++++++--------------
src/backend/executor/functions.c | 2 +-
src/backend/executor/nodeForeignscan.c | 2 +-
src/backend/executor/nodeHash.c | 24 ++++++++--
src/backend/executor/nodeHashjoin.c | 17 +++++--
src/backend/executor/nodeModifyTable.c | 26 +++++------
src/backend/executor/tqueue.c | 6 ++-
src/include/executor/tuptable.h | 9 ++--
16 files changed, 154 insertions(+), 87 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: andres@anarazel.de
Subject: Re: pgsql: Rejigger materializing and fetching a HeapTuple from a slot.
In-Reply-To: <E1gNQHu-0001xj-R4@gemulon.postgresql.org>
References: <E1gNQHu-0001xj-R4@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox