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

Commit2dc08bd

Browse files
committed
Properly determine length for on-disk TOAST values
In detoast_attr_slice, VARSIZE_ANY was used to compute compressed lengthof on-disk TOAST values. That's incorrect, because the varlena value maybe just a TOAST pointer, producing either bogus value or crashing.This is likely why the code was crashing on big-endian machines before540f316 replaced the VARSIZE with VARSIZE_ANY, which however onlymasked the issue.Reported-by: Rushabh LathiaDiscussion:https://postgr.es/m/CAL-OGkthU9Gs7TZchf5OWaL-Gsi=hXqufTxKv9qpNG73d5na_g@mail.gmail.com
1 parentd482f7f commit2dc08bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/access/common/detoast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ detoast_attr_slice(struct varlena *attr,
233233
* of a given length (after decompression).
234234
*/
235235
max_size=pglz_maximum_compressed_size(sliceoffset+slicelength,
236-
TOAST_COMPRESS_SIZE(attr));
236+
toast_pointer.va_extsize);
237237

238238
/*
239239
* Fetch enough compressed slices (compressed marker will get set

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp