1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-25 13:17:41 +03:00

Add support for multiple kinds of external toast datums.

To that end, support tags rather than lengths for external datums.
As an example of how this can be used, add support or "indirect"
tuples which point to some externally allocated memory containing
a toast tuple.  Similar infrastructure could be used for other
purposes, including, perhaps, support for alternative compression
algorithms.

Andres Freund, reviewed by Hitoshi Harada and myself
This commit is contained in:
Robert Haas
2013-07-02 13:35:14 -04:00
parent 148326b994
commit 3682025015
10 changed files with 472 additions and 43 deletions

View File

@@ -94,6 +94,11 @@
sizeof(int32) - \
VARHDRSZ)
/* Size of an EXTERNAL datum that contains a standard TOAST pointer */
#define TOAST_POINTER_SIZE (VARHDRSZ_EXTERNAL + sizeof(struct varatt_external))
/* Size of an indirect datum that contains an indirect TOAST pointer */
#define INDIRECT_POINTER_SIZE (VARHDRSZ_EXTERNAL + sizeof(struct varatt_indirect))
/* ----------
* toast_insert_or_update -