Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd819f5f

Browse files
Jan WieckJan Wieck
Jan Wieck
authored and
Jan Wieck
committed
Moving toaster out of NO ELOG area in heap_update().
Jan
1 parent651e98b commitd819f5f

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/0401:39:24 vadim Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.79 2000/07/0417: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+
#ifdefTUPLE_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-
#ifdefTUPLE_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)

[8]ページ先頭

©2009-2025 Movatter.jp