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)
104104 * we reuse the original reference to the old value
105105 * in the new tuple.
106106 */
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+
108112 continue ;
109113 }
110114 else if (toaster && toaster -> update_toast &&
@@ -276,7 +280,8 @@ toast_tuple_find_biggest_attribute(ToastTupleContext *ttc,
276280 continue ;
277281 if (VARATT_IS_EXTERNAL (value ) && !VARATT_IS_CUSTOM (value ))
278282 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 )))
280285 continue ;
281286 if (check_main && att -> attstorage != TYPSTORAGE_MAIN )
282287 continue ;
You can’t perform that action at this time.
0 commit comments