Re: Crash in BRIN summarization

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Emre Hasegeli <emre(at)hasegeli(dot)com>
Subject: Re: Crash in BRIN summarization
Date: 2020-01-20 08:44:28
Message-ID: 5dbe2126-73ed-02ef-4df8-709c942af01c@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 17/01/2020 23:35, Alvaro Herrera wrote:
> On 2019-Aug-28, Heikki Linnakangas wrote:
>
>> I bumped into a little bug in BRIN, while hacking on something unrelated.
>> This causes a segfault, or an assertion failure if assertions are enabled:
>
> Heikki, I just noticed that you haven't pushed this bugfix. Would you
> like me to? (If I don't hear from you, I'll probably get to it next
> week.)

Sorry, forgot all about it. Pushed now.

On 28/08/2019 14:03, Emre Hasegeli wrote:
>> brin_inclusion_union() has a similar issue, but I didn't write a script
>> to reproduce that. Fix attached.
>
> I am not sure about this part. If it's okay to use col_a->bv_values
> without copying, it should also be okay to use col_b->bv_values, no?

No, the 'a' and 'b' arguments are not symmetric. 'a' is in a long-lived
memory context, and the function modifies it in place, whereas 'b' is
short-lived and isn't touched by the function.

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2020-01-20 08:59:34 Re: Add support for automatically updating Unicode derived files
Previous Message Amit Kapila 2020-01-20 08:43:53 Re: PATCH: standby crashed when replay block which truncated in standby but failed to truncate in master node