pgsql: Fix bug in brin_minmax_multi_union

From: Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix bug in brin_minmax_multi_union
Date: 2021-04-04 17:37:15
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

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



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

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-04-04 18:29:09 pgsql: Fix confusion in SP-GiST between attribute type and leaf storage
Previous Message Tomas Vondra 2021-04-04 17:35:32 pgsql: Add regression test for minmax-multi macaddr8 type