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

Commit8cea358

Browse files
committed
Use the correct PG_DETOAST_DATUM macro in BRIN
Commit6bcda4a replaced PG_DETOAST_DATUM with PG_DETOAST_DATUM_PACKEDin two BRIN output functions, for minmax-multi and bloom opclasses. Butthis is incorrect - the code is accessing the data through structs thatalready include a 4B header, so the detoast needs to match that. But thePACKED macro may keep the 1B header, which means the struct fields willpoint to incorrect data.Backpatch-through: 16Discussion:https://postgr.es/m/1df00a66-db5a-4e66-809a-99b386a06d86%40enterprisedb.com
1 parentccd8f0f commit8cea358

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎src/backend/access/brin/brin_bloom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ brin_bloom_summary_out(PG_FUNCTION_ARGS)
769769
StringInfoDatastr;
770770

771771
/* detoast the data to get value with a full 4B header */
772-
filter= (BloomFilter*)PG_DETOAST_DATUM_PACKED(PG_GETARG_DATUM(0));
772+
filter= (BloomFilter*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
773773

774774
initStringInfo(&str);
775775
appendStringInfoChar(&str,'{');

‎src/backend/access/brin/brin_minmax_multi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3015,7 +3015,7 @@ brin_minmax_multi_summary_out(PG_FUNCTION_ARGS)
30153015
* Detoast to get value with full 4B header (can't be stored in a toast
30163016
* table, but can use 1B header).
30173017
*/
3018-
ranges= (SerializedRanges*)PG_DETOAST_DATUM_PACKED(PG_GETARG_DATUM(0));
3018+
ranges= (SerializedRanges*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
30193019

30203020
/* lookup output func for the type */
30213021
getTypeOutputInfo(ranges->typid,&outfunc,&isvarlena);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp