Content-Length: 267276 | pFad | http://github.com/postgrespro/postgres/commit/84f6d31c8756bd6b07ad3cd3f4851040a9ce1300

36 Fix alignment of custom TOAST pointers · postgrespro/postgres@84f6d31 · GitHub
Skip to content

Commit 84f6d31

Browse files
author
Nikita Glukhov
committed
Fix alignment of custom TOAST pointers
1 parent cac32a9 commit 84f6d31

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/backend/access/common/heaptuple.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,15 @@ fill_val(Form_pg_attribute att,
242242
else
243243
{
244244
*infomask |= HEAP_HASEXTERNAL;
245-
/* no alignment, since it's short by definition */
245+
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+
246254
data_length = VARSIZE_EXTERNAL(val);
247255
memcpy(data, val, data_length);
248256
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/84f6d31c8756bd6b07ad3cd3f4851040a9ce1300

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy