File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,11 @@ toast_tuple_init(ToastTupleContext *ttc)
104
104
* we reuse the original reference to the old value
105
105
* in the new tuple.
106
106
*/
107
- ttc -> ttc_attr [i ].tai_colflags |= TOASTCOL_IGNORE ;
107
+ if (VARATT_IS_EXTERNAL_ONDISK (new_value ))
108
+ ttc -> ttc_attr [i ].tai_colflags |= TOASTCOL_IGNORE ;
109
+ else
110
+ ttc -> ttc_attr [i ].tai_size = VARSIZE_ANY (new_value );
111
+
108
112
continue ;
109
113
}
110
114
else if (toaster && toaster -> update_toast &&
@@ -276,7 +280,8 @@ toast_tuple_find_biggest_attribute(ToastTupleContext *ttc,
276
280
continue ;
277
281
if (VARATT_IS_EXTERNAL (value ) && !VARATT_IS_CUSTOM (value ))
278
282
continue ; /* can't happen, toast_action would be PLAIN */
279
- if (for_compression && VARATT_IS_COMPRESSED (value ))
283
+ if (for_compression &&
284
+ (VARATT_IS_COMPRESSED (value ) || VARATT_IS_CUSTOM (value )))
280
285
continue ;
281
286
if (check_main && att -> attstorage != TYPSTORAGE_MAIN )
282
287
continue ;
You can’t perform that action at this time.
0 commit comments