From 8b94dab06617ef80a0901ab103ebd8754427ef5a Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Mon, 8 Jul 2019 11:58:05 -0400 Subject: Split tuptoaster.c into three separate files. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit detoast.c/h contain functions required to detoast a datum, partially or completely, plus a few other utility functions for examining the size of toasted datums. toast_internals.c/h contain functions that are used internally to the TOAST subsystem but which (mostly) do not need to be accessed from outside. heaptoast.c/h contains code that is intrinsically specific to the heap AM, either because it operates on HeapTuples or is based on the layout of a heap page. detoast.c and toast_internals.c are placed in src/backend/access/common rather than src/backend/access/heap. At present, both files still have dependencies on the heap, but that will be improved in a future commit. Patch by me, reviewed and tested by Prabhat Sabu, Thomas Munro, Andres Freund, and Álvaro Herrera. Discussion: http://postgr.es/m/CA+TgmoZv-=2iWM4jcw5ZhJeL18HF96+W1yJeYrnGMYdkFFnEpQ@mail.gmail.com --- src/backend/access/common/indextuple.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/backend/access/common/indextuple.c') diff --git a/src/backend/access/common/indextuple.c b/src/backend/access/common/indextuple.c index cb23be859de..07586201b9d 100644 --- a/src/backend/access/common/indextuple.c +++ b/src/backend/access/common/indextuple.c @@ -16,10 +16,17 @@ #include "postgres.h" +#include "access/detoast.h" +#include "access/heaptoast.h" #include "access/htup_details.h" #include "access/itup.h" -#include "access/tuptoaster.h" +#include "access/toast_internals.h" +/* + * This enables de-toasting of index entries. Needed until VACUUM is + * smart enough to rebuild indexes from scratch. + */ +#define TOAST_INDEX_HACK /* ---------------------------------------------------------------- * index_ tuple interface routines -- cgit v1.2.3