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

Commit84f6d31

Browse files
author
Nikita Glukhov
committed
Fix alignment of custom TOAST pointers
1 parentcac32a9 commit84f6d31

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)

[8]ページ先頭

©2009-2025 Movatter.jp