From: | Vinod Sridharan <vsridh90(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | niek(dot)brasa(at)hitachienergy(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #18831: Particular queries using gin-indexes are not interruptible, resulting is resource usage concerns. |
Date: | 2025-04-12 05:58:52 |
Message-ID: | CAFMdLD58WJPn_Jxc3KafrZsuVSRFiXX9y3F-05-1Du25x76Usw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hey Tom,
I managed to get a test that fails without my patch, and added it to
the intarray tests. Without the patch, the query returns 0 records.
With my patch, the results are correct (12 records).
Please find attached the updated patch with a fix & a test in the
intarray contrib. Thanks for the pointer to the contrib extensions.
-Vinod
On Fri, 11 Apr 2025 at 22:33, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Vinod Sridharan <vsridh90(at)gmail(dot)com> writes:
> > Since this is also called in the regular consistent function, this
> > would be adding work in the regular consistent path - where the caller
> > happens to reset the array for every invocation currently.
>
> Ah, so you're just worried about the extra work in that path?
> But MAX_MAYBE_ENTRIES is only 4, so I can't believe it'd amount
> to much.
>
> I am wondering about a test case. I'm not thrilled about building
> a specialized opclass just to test this. contrib/hstore and
> contrib/intarray already have opclasses with no triconsistent
> function, so they should (and do) exercise shimTriConsistentFn
> already. But their tests failed to expose this bug. I spent
> a bit of time trying to add an example that would show the bug
> in one or the other of those, and failed so far. Any ideas?
>
> regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Fix-gin-logic-for-triconsistentShim-add-a-test.patch | application/octet-stream | 2.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2025-04-12 16:40:28 | Re: BUG #18831: Particular queries using gin-indexes are not interruptible, resulting is resource usage concerns. |
Previous Message | Tom Lane | 2025-04-12 05:33:07 | Re: BUG #18831: Particular queries using gin-indexes are not interruptible, resulting is resource usage concerns. |