pgsql: tableam: Add and use table_fetch_row_version().

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: tableam: Add and use table_fetch_row_version().
Date: 2019-03-25 07:20:55
Message-ID: E1h8Juh-000801-OZ@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

tableam: Add and use table_fetch_row_version().

This is essentially the tableam version of heapam_fetch(),
i.e. fetching a tuple identified by a tid, performing visibility
checks.

Note that this different from table_index_fetch_tuple(), which is for
index lookups. It therefore has to handle a tid pointing to an earlier
version of a tuple if the AM uses an optimization like heap's HOT. Add
comments to that end.

This commit removes the stats_relation argument from heap_fetch, as
it's been unused for a long time.

Author: Andres Freund
Reviewed-By: Haribabu Kommi
Discussion: https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9a8ee1dc650be623c32b1df103254847be974d01

Modified Files
--------------
src/backend/access/heap/heapam.c | 9 +----
src/backend/access/heap/heapam_handler.c | 27 ++++++++++++-
src/backend/access/table/tableamapi.c | 1 +
src/backend/commands/trigger.c | 69 ++++++--------------------------
src/backend/executor/execMain.c | 13 ++----
src/backend/executor/nodeModifyTable.c | 22 ++--------
src/backend/executor/nodeTidscan.c | 16 ++------
src/include/access/heapam.h | 2 +-
src/include/access/tableam.h | 43 ++++++++++++++++++--
9 files changed, 91 insertions(+), 111 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2019-03-25 08:46:34 pgsql: Add macro to cast away volatile without allowing changes to unde
Previous Message Peter Eisentraut 2019-03-25 07:17:28 Re: pgsql: Collations with nondeterministic comparison