Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oWK3r-0000WS-Ie for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Sep 2022 16:07:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oWK3q-00030G-Dd for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Sep 2022 16:07:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oWK3p-000307-IU for pgsql-hackers@lists.postgresql.org; Thu, 08 Sep 2022 16:07:26 +0000 Received: from smtp-fw-6002.amazon.com ([52.95.49.90]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oWK3l-0007wK-5C for pgsql-hackers@lists.postgresql.org; Thu, 08 Sep 2022 16:07:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1662653242; x=1694189242; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to; bh=f0i3ilZem4QRddHzj3QDCThD86/nksUWAG9cusAnDQk=; b=sK4M2N1h9RyRkfiU2D2LNvaR1QpBx/ZNwRJKaehOk4OYRVtZu3d+VOZZ h0znHgDprxb4SZwzEaSiwNI3mfXTtvtmOPuQY3Xe/pqYlPhuFxG0ZiYcE HHJYan+QkxVbXe4BO+4gBvq299AKLhMCI7fQjp7n3tUawpm6YLcvrbvX5 8=; X-IronPort-AV: E=Sophos;i="5.93,300,1654560000"; d="scan'208,217";a="242471594" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-iad-1e-fc41acad.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-6002.iad6.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2022 16:07:10 +0000 Received: from EX13D03EUC003.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-iad-1e-fc41acad.us-east-1.amazon.com (Postfix) with ESMTPS id 97137C030F; Thu, 8 Sep 2022 16:07:07 +0000 (UTC) Received: from [192.168.1.123] (10.43.165.87) by EX13D03EUC003.ant.amazon.com (10.43.164.192) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Thu, 8 Sep 2022 16:07:06 +0000 Content-Type: multipart/alternative; boundary="------------RYZ42mqFTjryMxiHXCLmPS1q" Message-ID: Date: Thu, 8 Sep 2022 18:07:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH] Query Jumbling for CALL and SET utility statements Content-Language: en-US To: Julien Rouhaud CC: Michael Paquier , Jeremy Schneider , PostgreSQL Hackers , Pavel Stehule , Andres Freund , "Imseih (AWS), Sami" References: <46ca04f9-1e37-c862-9a28-c5dffaee412f@amazon.com> <20220831190604.l2luuhj3xkau7dvk@awork3.anarazel.de> <09c04aba-7f12-e524-20f7-3f92c1479fdf@amazon.com> <9aee54f2-5cc1-5b64-1f73-6961932e7bd2@amazon.com> <20220908065012.l3bd2np7wj52cxco@jrouhaud> <20220908112919.2ytxpkitiw6lt2u6@jrouhaud> From: "Drouvot, Bertrand" In-Reply-To: <20220908112919.2ytxpkitiw6lt2u6@jrouhaud> X-Originating-IP: [10.43.165.87] X-ClientProxiedBy: EX13D02EUC004.ant.amazon.com (10.43.164.117) To EX13D03EUC003.ant.amazon.com (10.43.164.192) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --------------RYZ42mqFTjryMxiHXCLmPS1q Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Hi, On 9/8/22 1:29 PM, Julien Rouhaud wrote: > Hi, > > On Thu, Sep 08, 2022 at 11:06:51AM +0200, Drouvot, Bertrand wrote: >> Hi, >> >> On 9/8/22 8:50 AM, Julien Rouhaud wrote: >> >> Thanks for looking at it! >> >>> On Thu, Sep 08, 2022 at 02:23:19PM +0900, Michael Paquier wrote: >>>> On Wed, Sep 07, 2022 at 06:19:42PM -0700, Jeremy Schneider wrote: >>>>> I didn't fully debug yet, but here's the backtrace on my 14.4 build with >>>>> the patch >>>> What happens on HEAD? That would be the target branch for a new >>>> feature. >>> It would be the same AFAICS. From v3: >>> >>> + case T_VariableSetStmt: >>> + { >>> + VariableSetStmt *stmt = (VariableSetStmt *) node; >>> + >>> + APP_JUMB_STRING(stmt->name); >>> + JumbleExpr(jstate, (Node *) stmt->args); >>> + } >>> >>> For a RESET ALL command stmt->name is NULL. >> Right, please find attached v4 addressing the issue and also Sami's comments >> [1]. > (Sorry I've not been following this thread until now) > > IME if your application relies on 2PC it's very likely that you will hit the > exact same problems described in your original email. Agree > What do you think about > normalizing those too while working on the subject? That sounds reasonable, I'll have a look at those too while at it. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services:https://aws.amazon.com --------------RYZ42mqFTjryMxiHXCLmPS1q Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: 7bit

Hi,

On 9/8/22 1:29 PM, Julien Rouhaud wrote:
Hi,

On Thu, Sep 08, 2022 at 11:06:51AM +0200, Drouvot, Bertrand wrote:
Hi,

On 9/8/22 8:50 AM, Julien Rouhaud wrote:

Thanks for looking at it!

On Thu, Sep 08, 2022 at 02:23:19PM +0900, Michael Paquier wrote:
On Wed, Sep 07, 2022 at 06:19:42PM -0700, Jeremy Schneider wrote:
I didn't fully debug yet, but here's the backtrace on my 14.4 build with
the patch
What happens on HEAD?  That would be the target branch for a new
feature.
It would be the same AFAICS.  From v3:

+               case T_VariableSetStmt:
+                       {
+                               VariableSetStmt *stmt = (VariableSetStmt *) node;
+
+                               APP_JUMB_STRING(stmt->name);
+                               JumbleExpr(jstate, (Node *) stmt->args);
+                       }

For a RESET ALL command stmt->name is NULL.
Right, please find attached v4 addressing the issue and also Sami's comments
[1].
(Sorry I've not been following this thread until now)

IME if your application relies on 2PC it's very likely that you will hit the
exact same problems described in your original email. 

Agree

 What do you think about
normalizing those too while working on the subject?

That sounds reasonable, I'll have a look at those too while at it.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
--------------RYZ42mqFTjryMxiHXCLmPS1q--