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