pgsql: tableam: New callback relation_fetch_toast_slice. - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: tableam: New callback relation_fetch_toast_slice.
Date
Msg-id E1ioufI-0002oy-KL@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: tableam: New callback relation_fetch_toast_slice.
List pgsql-committers
tableam: New callback relation_fetch_toast_slice.

Instead of always calling heap_fetch_toast_slice during detoasting,
invoke a table AM callback which, when the toast table is a heap
table, will be heap_fetch_toast_slice.

This makes it possible for a table AM other than heap to be used
as a TOAST table. It also completes the series of commits intended
to improve the interaction of tableam with TOAST that began with
commit 8b94dab06617ef80a0901ab103ebd8754427ef5a; detoast.c is
now, hopefully, fully AM-independent.

Patch by me, reviewed by Andres Freund and Peter Eisentraut.

Discussion: http://postgr.es/m/CA+TgmoZv-=2iWM4jcw5ZhJeL18HF96+W1yJeYrnGMYdkFFnEpQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ce242ae154dde3217971c6f262705d80999f4e00

Modified Files
--------------
src/backend/access/common/detoast.c      | 199 +------------------------------
src/backend/access/heap/heapam_handler.c |   1 +
src/backend/access/heap/heaptoast.c      | 182 ++++++++++++++++++++++++++++
src/include/access/heaptoast.h           |  10 ++
src/include/access/tableam.h             |  46 +++++++
5 files changed, 245 insertions(+), 193 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: tableam: Allow choice of toast AM.
Next
From: Alvaro Herrera
Date:
Subject: pgsql: pg_stat_activity: show NULL stmt start time for walsenders