Skip to content

Commit d819f5f

Browse files
Jan WieckJan Wieck
authored andcommitted
Moving toaster out of NO ELOG area in heap_update().
Jan
1 parent 651e98b commit d819f5f

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/backend/access/heap/heapam.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.78 2000/07/04 01:39:24 vadim Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.79 2000/07/04 17:11:40 wieck Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -1564,6 +1564,19 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
15641564
newtup->t_data->t_infomask &= ~(HEAP_XACT_MASK);
15651565
newtup->t_data->t_infomask |= (HEAP_XMAX_INVALID | HEAP_UPDATED);
15661566

1567+
#ifdef TUPLE_TOASTER_ACTIVE
1568+
/* ----------
1569+
* If this relation is enabled for toasting, let the toaster
1570+
* delete not any longer needed entries and create new ones to
1571+
* make the new tuple fit again.
1572+
* ----------
1573+
*/
1574+
if (HeapTupleHasExtended(&oldtup) ||
1575+
HeapTupleHasExtended(newtup) ||
1576+
(MAXALIGN(newtup->t_len) > (MaxTupleSize / 4)))
1577+
heap_tuple_toast_attrs(relation, newtup, &oldtup);
1578+
#endif
1579+
15671580
/* Find buffer for new tuple */
15681581

15691582
if ((unsigned) MAXALIGN(newtup->t_len) <= PageGetFreeSpace((Page) dp))
@@ -1582,19 +1595,6 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
15821595
oldtup.t_data->t_infomask &= ~(HEAP_XMAX_COMMITTED |
15831596
HEAP_XMAX_INVALID | HEAP_MARKED_FOR_UPDATE);
15841597

1585-
#ifdef TUPLE_TOASTER_ACTIVE
1586-
/* ----------
1587-
* If this relation is enabled for toasting, let the toaster
1588-
* delete not any longer needed entries and create new ones to
1589-
* make the new tuple fit again.
1590-
* ----------
1591-
*/
1592-
if (HeapTupleHasExtended(&oldtup) ||
1593-
HeapTupleHasExtended(newtup) ||
1594-
(MAXALIGN(newtup->t_len) > (MaxTupleSize / 4)))
1595-
heap_tuple_toast_attrs(relation, newtup, &oldtup);
1596-
#endif
1597-
15981598
/* record address of new tuple in t_ctid of old one */
15991599
oldtup.t_data->t_ctid = newtup->t_self;
16001600

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy