23 #define MaximumBytesPerTuple(tuplesPerPage) \
24 MAXALIGN_DOWN((BLCKSZ - \
25 MAXALIGN(SizeOfPageHeaderData + (tuplesPerPage) * sizeof(ItemIdData))) \
46 #define TOAST_TUPLES_PER_PAGE 4
48 #define TOAST_TUPLE_THRESHOLD MaximumBytesPerTuple(TOAST_TUPLES_PER_PAGE)
50 #define TOAST_TUPLE_TARGET TOAST_TUPLE_THRESHOLD
59 #define TOAST_TUPLES_PER_PAGE_MAIN 1
61 #define TOAST_TUPLE_TARGET_MAIN MaximumBytesPerTuple(TOAST_TUPLES_PER_PAGE_MAIN)
68 #define TOAST_INDEX_TARGET (MaxHeapTupleSize / 16)
80 #define EXTERN_TUPLES_PER_PAGE 4
82 #define EXTERN_TUPLE_MAX_SIZE MaximumBytesPerTuple(EXTERN_TUPLES_PER_PAGE)
84 #define TOAST_MAX_CHUNK_SIZE \
85 (EXTERN_TUPLE_MAX_SIZE - \
86 MAXALIGN(SizeofHeapTupleHeader) - \
107 bool is_speculative);
static Datum values[MAXATTR]
void heap_fetch_toast_slice(Relation toastrel, Oid valueid, int32 attrsize, int32 sliceoffset, int32 slicelength, struct varlena *result)
void heap_toast_delete(Relation rel, HeapTuple oldtup, bool is_speculative)
HeapTuple heap_toast_insert_or_update(Relation rel, HeapTuple newtup, HeapTuple oldtup, int options)
HeapTuple toast_build_flattened_tuple(TupleDesc tupleDesc, Datum *values, bool *isnull)
HeapTuple toast_flatten_tuple(HeapTuple tup, TupleDesc tupleDesc)
Datum toast_flatten_tuple_to_datum(HeapTupleHeader tup, uint32 tup_len, TupleDesc tupleDesc)