We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cac32a9 commit 84f6d31Copy full SHA for 84f6d31
src/backend/access/common/heaptuple.c
@@ -242,7 +242,15 @@ fill_val(Form_pg_attribute att,
242
else
243
{
244
*infomask |= HEAP_HASEXTERNAL;
245
- /* no alignment, since it's short by definition */
+
246
+ /*
247
+ * Align custom TOAST pointers. Ordinary pointers have
248
+ * no alignment, since they are short by definition.
249
+ */
250
+ if (VARATT_IS_CUSTOM(val))
251
+ data = (char *) att_align_nominal(data,
252
+ att->attalign);
253
254
data_length = VARSIZE_EXTERNAL(val);
255
memcpy(data, val, data_length);
256
}
0 commit comments