| From: | Tomas Vondra <tomas(at)vondra(dot)me> |
|---|---|
| To: | Peter Geoghegan <pg(at)bowt(dot)ie>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Parallel GIN, BRIN builds fail to maintain ii_BrokenHotChain |
| Date: | 2026-11-20 01:55:59 |
| Message-ID: | 15e2f0b3-9faf-4f93-86b8-18c24abc445a@vondra.me |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 11/20/26 01:46, Peter Geoghegan wrote:
> My LLM produced the attached patch, which adds an isolation test
> showing that parallel index builds of both GIN and BRIN indexes fail
> to maintain ii_BrokenHotChain correctly. The test fails, demonstrating
> incorrect results.
>
> The underlying bug is straightforward: both GIN and BRIN lack the
> required handling. If any individual parallel worker sets
> ii_BrokenHotChain, then it has to be passed on to the leader so that
> pg_index.indcheckxmin gets set correctly. Otherwise, older snapshots
> can use the index even though it isn't guaranteed to have index tuples
> for every row version that the snapshot can still see. nbtree gets
> this right, but that precedent seems to have been missed.
>
Thanks for noticing it, and for the reproducer. I'll get it fixed
(unless you want to take care of that).
regards
--
Tomas Vondra
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kyotaro Horiguchi | 2026-11-20 02:12:11 | Re: Injection point: fix race condition between attach and cleanup |
| Previous Message | Keyerror Smart | 2026-11-20 01:55:43 | Re: [PATCH]Fix planner's strictness check for JsonExpr |