1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-22 14:32:25 +03:00

Temporary fix to make TOAST vacuum-safe. All values are forced to be

in memory (plain or compressed) in the tuple returned from the heap-am.
So no index will ever contain an external reference.

Jan
This commit is contained in:
Jan Wieck
2000-07-21 10:31:31 +00:00
parent 9e85183bfc
commit 82f3945a67
3 changed files with 202 additions and 7 deletions

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 2000, PostgreSQL Development Team
*
* $Id: tuptoaster.h,v 1.5 2000/07/04 06:11:50 tgl Exp $
* $Id: tuptoaster.h,v 1.6 2000/07/21 10:31:31 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -20,6 +20,14 @@
#include "access/tupmacs.h"
#include "utils/rel.h"
/*
* DO NOT ENABLE THIS
* until we have crash safe file versioning and you've
* changed VACUUM to recreate indices that use possibly
* toasted values. 2000/07/20 Jan
*/
#undef TOAST_INDICES
#define TOAST_MAX_CHUNK_SIZE ((MaxTupleSize - \
MAXALIGN( \
@@ -29,8 +37,14 @@
MAXALIGN(VARHDRSZ))) / 4)
#ifdef TOAST_INDICES
extern void heap_tuple_toast_attrs(Relation rel,
HeapTuple newtup, HeapTuple oldtup);
#else
extern void heap_tuple_toast_attrs(Relation rel,
HeapTuple newtup, HeapTuple oldtup,
HeapTupleHeader *plaintdata, int32 *plaintlen);
#endif
extern varattrib *heap_tuple_untoast_attr(varattrib * attr);