pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use the correct PG_DETOAST_DATUM macro in BRIN
Date: Sun, 14 Apr 2024 16:26:59 +0000
Message-ID: <E1rw2h1-0022Yv-EN@gemulon.postgresql.org> (raw)

Use the correct PG_DETOAST_DATUM macro in BRIN

Commit 6bcda4a721 replaced PG_DETOAST_DATUM with PG_DETOAST_DATUM_PACKED
in two BRIN output functions, for minmax-multi and bloom opclasses. But
this is incorrect - the code is accessing the data through structs that
already include a 4B header, so the detoast needs to match that. But the
PACKED macro may keep the 1B header, which means the struct fields will
point to incorrect data.

Backpatch-through: 16
Discussion: https://postgr.es/m/1df00a66-db5a-4e66-809a-99b386a06d86%40enterprisedb.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bb616ed3e6a2b263be320026e1660bd36827c858

Modified Files
--------------
src/backend/access/brin/brin_bloom.c        | 2 +-
src/backend/access/brin/brin_minmax_multi.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1rw2h1-0022Yv-EN@gemulon.postgresql.org>
Permalink:  ../E1rw2h1-0022Yv-EN@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rw2h1-0022Yv-EN@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tomas.vondra@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Use the correct PG_DETOAST_DATUM macro in BRIN
  In-Reply-To: <E1rw2h1-0022Yv-EN@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox