| From: | shihao zhong <zhong950419(at)gmail(dot)com> |
|---|---|
| To: | Michael Malis <malis(at)pgrust(dot)com> |
| Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: GiST: SERIALIZABLE misses conflict when scan prunes at internal page |
| Date: | 2026-12-01 00:11:54 |
| Message-ID: | CAGRkXqTjQf8B+MZruPGigy37_L39sofriCn_rk9mcYs+e_+NQA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Hi Michael,
Thanks for the spec and i am able to repro it.
Once an insert widens the downlink, later inserts into that subtree no
longer touch the page the scan locked. The attached patch makes the
child page inherit those locks, and its test fails without the fix and
passes with it. I think it should go back to 15.
I also thought about two other ways. An insert could check for conflicts
on every page it descends through, but then it would conflict with every
scan that read the root. A scan could lock the children it prunes, but
that takes many more locks and makes every reader pay.
Thanks,
Shihao
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Fix-GiST-predicate-locking-for-scans-that-prune-a.patch | application/octet-stream | 6.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | shihao zhong | 2026-12-01 00:15:47 | Re: BUG #19846: dump/restore marks inherited NOT VALID not-null constraint as local |
| Previous Message | shihao zhong | 2026-12-01 00:07:21 | Re: BUG #19944: Memoize caches volatile LATERAL scans across RTE_FUNCTION and RTE_VALUES, returning wrong results |