diff options
Diffstat (limited to 'src/backend/access/heap/heapam.c')
| -rw-r--r-- | src/backend/access/heap/heapam.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 1e22c03046..d5f36e4e4d 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.83 2000/08/03 19:18:54 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.84 2000/08/04 04:16:06 tgl Exp $ * * * INTERFACE ROUTINES @@ -1362,7 +1362,7 @@ heap_insert(Relation relation, HeapTuple tup) * ---------- */ if (HeapTupleHasExtended(tup) || - (MAXALIGN(tup->t_len) > (MaxTupleSize / 4))) + (MAXALIGN(tup->t_len) > TOAST_TUPLE_THRESHOLD)) heap_tuple_toast_attrs(relation, tup, NULL); #endif @@ -1621,13 +1621,15 @@ l2: #ifdef TUPLE_TOASTER_ACTIVE /* ---------- * If this relation is enabled for toasting, let the toaster - * delete not any longer needed entries and create new ones to - * make the new tuple fit again. + * delete any no-longer-needed entries and create new ones to + * make the new tuple fit again. Also, if there are already- + * toasted values from some other relation, the toaster must + * fix them. * ---------- */ if (HeapTupleHasExtended(&oldtup) || - HeapTupleHasExtended(newtup) || - (MAXALIGN(newtup->t_len) > (MaxTupleSize / 4))) + HeapTupleHasExtended(newtup) || + (MAXALIGN(newtup->t_len) > TOAST_TUPLE_THRESHOLD)) heap_tuple_toast_attrs(relation, newtup, &oldtup); #endif |
