Skip to content

Commit 8b94dab

Browse files
committed
Split tuptoaster.c into three separate files.
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
1 parent 74a308c commit 8b94dab

37 files changed

+2612
-2557
lines changed

doc/src/sgml/storage.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ The oldest and most common type is a pointer to out-of-line data stored in
382382
a <firstterm><acronym>TOAST</acronym> table</firstterm> that is separate from, but
383383
associated with, the table containing the <acronym>TOAST</acronym> pointer datum
384384
itself. These <firstterm>on-disk</firstterm> pointer datums are created by the
385-
<acronym>TOAST</acronym> management code (in <filename>access/heap/tuptoaster.c</filename>)
385+
<acronym>TOAST</acronym> management code (in <filename>access/common/toast_internals.c</filename>)
386386
when a tuple to be stored on disk is too large to be stored as-is.
387387
Further details appear in <xref linkend="storage-toast-ondisk"/>.
388388
Alternatively, a <acronym>TOAST</acronym> pointer datum can contain a pointer to

src/backend/access/common/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ subdir = src/backend/access/common
1212
top_builddir = ../../../..
1313
include $(top_builddir)/src/Makefile.global
1414

15-
OBJS = bufmask.o heaptuple.o indextuple.o printsimple.o printtup.o \
16-
relation.o reloptions.o scankey.o session.o tupconvert.o tupdesc.o
15+
OBJS = bufmask.o detoast.o heaptuple.o indextuple.o printsimple.o \
16+
printtup.o relation.o reloptions.o scankey.o session.o toast_internals.o \
17+
tupconvert.o tupdesc.o
1718

1819
include $(top_srcdir)/src/backend/common.mk

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy