Re: array_agg(anyarray) silently produces corrupt results with parallel workers when inputs mix NULL and non-NULL array elements - Mailing list pgsql-bugs
From
Dmytro Astapov
Subject
Re: array_agg(anyarray) silently produces corrupt results with parallel workers when inputs mix NULL and non-NULL array elements
The initial-setup path is confused about that too, allocating newnitems+1 which is pointless.
Yes, using newnitems directly is cleaner than my Max() approach, thank you.
It also troubled me that there's no checks for integer overflow when calculating the new sizes.
Good catch, I hadn't considered that.
So I end with the attached revised patch, where I also made one or two cosmetic adjustments like putting the type-comparison checks next to the dimension comparisons. Look good to you?
Looks good, thank you for improving it.
I built and tested your v2 patch on REL_17_9 and REL_18_3 (with minor adaptation for the slightly different context lines, like bits8 vs uint8 on 17.x), using the same 10M-row synthetic reproduction from my original report. They both pass (as expected).
I am attaching the amended patch files for REL_17_9 and REL_18_3 just in case.
Thank you for the feedback and for the quick turnaround on this!
From:
Tom Lane Date: Subject:
Re: array_agg(anyarray) silently produces corrupt results with parallel workers when inputs mix NULL and non-NULL array elements
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
✖
By continuing to browse this website, you agree to the use of cookies. Go to Privacy Policy.