pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Vinod Sridharan <vsridh90@gmail.com>
Cc: niek.brasa@hitachienergy.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18831: Particular queries using gin-indexes are not interruptible, resulting is resource usage concerns.
Date: Sat, 12 Apr 2025 12:40:28 -0400
Message-ID: <362681.1744476028@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFMdLD58WJPn_Jxc3KafrZsuVSRFiXX9y3F-05-1Du25x76Usw@mail.gmail.com>
References: <18831-e845ac44ebc5dd36@postgresql.org>
	<474911.1741207802@sss.pgh.pa.us>
	<CAFMdLD7XzsXfi1+DpTqTgrD8XU0i2C99KuF=5VHLWjx4C1pkcg@mail.gmail.com>
	<1026035.1744415680@sss.pgh.pa.us>
	<CAFMdLD4SC1=NDOHL-LOAonb6aycv2D1MGbwdiT3M9=A7SfiXow@mail.gmail.com>
	<1098251.1744426831@sss.pgh.pa.us>
	<CAFMdLD4Ks5b=CbBh1PjFSytm0zdNv9-ddyeE+opusAKCVph7=g@mail.gmail.com>
	<1126691.1744435987@sss.pgh.pa.us>
	<CAFMdLD58WJPn_Jxc3KafrZsuVSRFiXX9y3F-05-1Du25x76Usw@mail.gmail.com>

Vinod Sridharan <vsridh90@gmail.com> writes:
> 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).

Cool, thanks.

> Please find attached the updated patch with a fix & a test in the
> intarray contrib. Thanks for the pointer to the contrib extensions.

Pushed with light editorialization.  I noticed one other bug in the
same area: shimTriConsistentFn wasn't paying attention to the recheck
flag returned by its first call to the underlying consistentFn.
I think this is probably just a latent issue, because if any of the
later calls return recheck = true we'll end with the correct
result anyway.  And at least for the contrib modules that depend
on this, the recheck flag doesn't depend on the key-presence inputs.
But it's theoretically possible we'd get the wrong answer.

			regards, tom lane





view thread (10+ messages)

Message-ID: <362681.1744476028@sss.pgh.pa.us>
Permalink:  ../362681.1744476028@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/362681.1744476028@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, vsridh90@gmail.com, niek.brasa@hitachienergy.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18831: Particular queries using gin-indexes are not interruptible, resulting is resource usage concerns.
  In-Reply-To: <362681.1744476028@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox