aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Wieck <JanWieck@Yahoo.com>2000-07-04 17:11:40 +0000
committerJan Wieck <JanWieck@Yahoo.com>2000-07-04 17:11:40 +0000
commitd819f5fe839cbbfedf7f40477efed04442081e8d (patch)
treebde41ec9b313dc519e83a2700aa864c4cc53fa20 /src
parent651e98b17fcb58f15af0eac5d82ae4cedfeaf320 (diff)
downloadpostgresql-d819f5fe839cbbfedf7f40477efed04442081e8d.tar.gz
postgresql-d819f5fe839cbbfedf7f40477efed04442081e8d.zip
Moving toaster out of NO ELOG area in heap_update().
Jan
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/heap/heapam.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 5a547bc3a2e..6a7f9ee1e2c 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.78 2000/07/04 01:39:24 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.79 2000/07/04 17:11:40 wieck Exp $
*
*
* INTERFACE ROUTINES
@@ -1564,6 +1564,19 @@ l2:
newtup->t_data->t_infomask &= ~(HEAP_XACT_MASK);
newtup->t_data->t_infomask |= (HEAP_XMAX_INVALID | HEAP_UPDATED);
+#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.
+ * ----------
+ */
+ if (HeapTupleHasExtended(&oldtup) ||
+ HeapTupleHasExtended(newtup) ||
+ (MAXALIGN(newtup->t_len) > (MaxTupleSize / 4)))
+ heap_tuple_toast_attrs(relation, newtup, &oldtup);
+#endif
+
/* Find buffer for new tuple */
if ((unsigned) MAXALIGN(newtup->t_len) <= PageGetFreeSpace((Page) dp))
@@ -1582,19 +1595,6 @@ l2:
oldtup.t_data->t_infomask &= ~(HEAP_XMAX_COMMITTED |
HEAP_XMAX_INVALID | HEAP_MARKED_FOR_UPDATE);
-#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.
- * ----------
- */
- if (HeapTupleHasExtended(&oldtup) ||
- HeapTupleHasExtended(newtup) ||
- (MAXALIGN(newtup->t_len) > (MaxTupleSize / 4)))
- heap_tuple_toast_attrs(relation, newtup, &oldtup);
-#endif
-
/* record address of new tuple in t_ctid of old one */
oldtup.t_data->t_ctid = newtup->t_self;