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: Fix bug in brin_minmax_multi_union
Date: Sun, 04 Apr 2021 17:37:15 +0000
Message-ID: <E1lT6gV-00044a-3F@gemulon.postgresql.org> (raw)

Fix bug in brin_minmax_multi_union

When calling sort_expanded_ranges() we need to remember the return
value, because the function sorts and also deduplicates the ranges. So
the number of ranges may decrease. brin_minmax_multi_union failed to do
that, which resulted in crashes due to bogus ranges (equal minval/maxval
but not marked as compacted).

Reported-by: Jaime Casanova
Discussion: https://postgr.es/m/20210404052550.GA4376%40ahch-to

Branch
------
master

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

Modified Files
--------------
src/backend/access/brin/brin_minmax_multi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



Message-ID: <E1lT6gV-00044a-3F@gemulon.postgresql.org>
Permalink:  ../E1lT6gV-00044a-3F@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lT6gV-00044a-3F@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tomas.vondra@postgresql.org
  Subject: Re: pgsql: Fix bug in brin_minmax_multi_union
  In-Reply-To: <E1lT6gV-00044a-3F@gemulon.postgresql.org>
  References: <E1lT6gV-00044a-3F@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