Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u3R6o-00FkR5-0z for pgsql-bugs@arkaria.postgresql.org; Sat, 12 Apr 2025 03:00:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u3R6k-00043J-Dy for pgsql-bugs@arkaria.postgresql.org; Sat, 12 Apr 2025 03:00:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u3R6k-00043A-5W for pgsql-bugs@lists.postgresql.org; Sat, 12 Apr 2025 03:00:38 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u3R6i-004PCf-2h for pgsql-bugs@lists.postgresql.org; Sat, 12 Apr 2025 03:00:37 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 53C30V701098252; Fri, 11 Apr 2025 23:00:31 -0400 From: Tom Lane To: Vinod Sridharan cc: 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: References: <18831-e845ac44ebc5dd36@postgresql.org> <474911.1741207802@sss.pgh.pa.us> <1026035.1744415680@sss.pgh.pa.us> Comments: In-reply-to Vinod Sridharan message dated "Fri, 11 Apr 2025 19:17:28 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1098250.1744426831.1@sss.pgh.pa.us> Date: Fri, 11 Apr 2025 23:00:31 -0400 Message-ID: <1098251.1744426831@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Vinod Sridharan writes: > -- create textops operator class without triconsistent OK, got it, and I concur that we need to make shimTriConsistentFn() restore the state of the entryRes array before it returns. But I don't understand why you're concerned about "However, this would also reset it during the regular triConsistent check per tuple"? I think the point is basically that this function is violating the expectation that triconsistent functions not change the state of that array. That expectation doesn't depend on what the call site is. regards, tom lane