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 1tdjSB-009Bcg-Mf for pgsql-hackers@arkaria.postgresql.org; Fri, 31 Jan 2025 05:20:32 +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 1tdjSA-00Fgqb-7Z for pgsql-hackers@arkaria.postgresql.org; Fri, 31 Jan 2025 05:20:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tdjS9-00FgqT-Rj for pgsql-hackers@lists.postgresql.org; Fri, 31 Jan 2025 05:20:29 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tdjS7-002SfV-0m for pgsql-hackers@lists.postgresql.org; Fri, 31 Jan 2025 05:20:29 +0000 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-5401c68b89eso1472884e87.0 for ; Thu, 30 Jan 2025 21:20:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fittl.com; s=google; t=1738300827; x=1738905627; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=E202iLsLUQseZ8btnfn4IwyyupQOSLzuB3ett3JBKCk=; b=FOlj1OWykXrmbo9K8Vc1I/wA3QdVkRVqNfJvAh3/xXaJ+lOhJIXoJivxLwe0KtP8N4 yfIW7myCtaf44XlDmHWBKXSLehRgfnOCTkM3/zuDeZ3pxfaiSxAicraiKGSwmZgNKwjr SDx9x1rly9iEsd2H6whDaSO5cavoH9UTpU1M4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738300827; x=1738905627; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=E202iLsLUQseZ8btnfn4IwyyupQOSLzuB3ett3JBKCk=; b=M+woPRS09ksL+KxAn7yXd82BqrRc05DgHJfsWIftI+6b3Orr9b7GtVswFv/n659w9j su196kESMJoQkW89Um2nvfcdtn0SCp/F8xMLKezvilrZhS2s/cNsF+943PjXlMUGD5Ht rnI6QQW0AA96bOhrdFTSRRMEnTs9iUVoIz2ROxlZZTPAbre3fChGxu9afbxfVCOgA7qa Fzu2D/WkiTHwvll5YbnX6dsa+Lm3AOKmZPrh3OdocHR/ckHEdDBwraWMG/YXgJF1A/NG TFByRNcvnjYY7e0Pn+Gupy+aRUG82iN1th2oGjMEM8K59FxvH1HJrKQwaxbu291ovkSa in1w== X-Forwarded-Encrypted: i=1; AJvYcCUqxDimTVEscNKDBv0vcqkL/6YZQd9it6Tk2OpgmuMs0Xfgz0hHK6TgukDE9ciLK3X/gy3n2csv2jxTT1pd@lists.postgresql.org X-Gm-Message-State: AOJu0YyEHoSLh0cixOrjlLkReUeoeSH+XRTdgy3IqgAAn3SL0BYteEyd xRJs8m/R6cqG/+1lqyCFo0zisvN/Sf5hSqRMoBkA2x+zZvlXliAdHiJggv3MpLq+kSme3tPzaVe OeDgYArW9TP27dX3LiNz9YseEotjf+RyZhT1z X-Gm-Gg: ASbGncsTYSYqLi8bCYTGoP+g2BCJ0cEr736Nw7ca088Dx3ot6sCXIlrBYKUfwBp+98t fLxNdKPmxP6ZR1kDa4FVS1ZK9hHylr+zRuqWuOZOMghiPtIYSZtVWLFISTzyierTlwEq7hc1pag == X-Google-Smtp-Source: AGHT+IEcVEb3rDKOHgnjmEnrhgAnANS/yQxqCpdn2zzVeq8g5Sl9MgXmPvam8PXStgNvPQbxbs1ayg4WiBcIapzs6oE= X-Received: by 2002:a19:f812:0:b0:542:91f3:1514 with SMTP id 2adb3069b0e04-543ea3ac7c4mr1832589e87.1.1738300825653; Thu, 30 Jan 2025 21:20:25 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Lukas Fittl Date: Thu, 30 Jan 2025 21:19:49 -0800 X-Gm-Features: AWEUYZmRul-llcp2704Wpdu3W1QSECevRfrPXNvzH5H7aZsQo0Okk4aENr53cvY Message-ID: Subject: Re: [PATCH] Optionally record Plan IDs to track plan changes for a query To: Michael Paquier Cc: Sami Imseih , PostgreSQL Hackers , Marko M Content-Type: multipart/alternative; boundary="00000000000039f1e0062cf9b3a8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000039f1e0062cf9b3a8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jan 30, 2025 at 8:37=E2=80=AFPM Michael Paquier wrote: > After thinking more about this one, I still want this toy and hearing > nothing I have applied it, with a second commit for the addition in > injection_points to avoid multiple bullet points in a single commit. > Thanks for committing! I had intended to review/test your patch, but the earlier parts of the week got way too busy. I think the API with do_drop makes sense, and whilst I'd think there is some extra overhead to calling the function vs having an inline check for kind, it seems unlikely this would be used in a performance critical context, and the flexibility seems useful. I have noticed post-commit that I have made a mistake in the credits > of a632cd354d35 and ce5c620fb625 for your family name. Really sorry > about that! This mistake is on me.. > No worries regarding the name, happens to me all the time :) > What do you think? > > Attached is a rebased version of the three remaining patches. While > looking at this stuff, I have noticed an extra cleanup that would be > good to have, as a separate change: we could reformat a bit the plan > header comments so as these do not require a rewrite when adding > node_attr to them, like d575051b9af9. > Yeah, I think that'd be helpful to move the comments before the fields - it definitely gets hard to read. Sami's patch set posted at [1] has the same problem, making the > proposals harder to parse and review, and the devil is in the details > with these pg_node_attr() properties attached to the structures. That > would be something to do on top of the proposed patch sets. Would any > of you be interested in that? > I'd be happy to tackle that - were you thinking to simply move any comments before the field, in each case where we're adding an annotation? Separately I've been thinking how we could best have a discussion/review on whether the jumbling of specific plan struct fields is correct. I was thinking maybe a quick wiki page could be helpful, noting why to jumble/not jumble certain fields? Thanks, Lukas --=20 Lukas Fittl --00000000000039f1e0062cf9b3a8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Jan 30, 2025 at 8:37=E2=80=AFPM M= ichael Paquier <michael@paquier.x= yz> wrote:
After thinking more about th= is one, I still want this toy and hearing
nothing I have applied it, with a second commit for the addition in
injection_points to avoid multiple bullet points in a single commit.

Thanks for committing! I had intended to= review/test your patch, but the earlier parts of the week got way too busy= .

I think the API with do_drop makes sense, and whilst I'd think there is some extra overhead to calling the function vs having an inline check for = kind, it=20 seems unlikely this would be used in a performance critical context, and th= e flexibility seems useful.

I have noticed post-commit that I have made a mistake in the credits
of a632cd354d35 and ce5c620fb625 for your family name.=C2=A0 Really sorry about that!=C2=A0 This mistake is on me..

No worri= es regarding the name, happens to me all the time :)

> What do you think?

Attached is a rebased version of the three remaining patches.=C2=A0 While looking at this stuff, I have noticed an extra cleanup that would be
good to have, as a separate change: we could reformat a bit the plan
header comments so as these do not require a rewrite when adding
node_attr to them, like d575051b9af9.

Y= eah, I think that'd be helpful to move the comments before the fields -= it definitely gets hard to read.

Sami's patch set posted at [1] has the same problem, making the
proposals harder to parse and review, and the devil is in the details
with these pg_node_attr() properties attached to the structures.=C2=A0 That=
would be something to do on top of the proposed patch sets.=C2=A0 Would any=
of you be interested in that?

I'd b= e happy to tackle that - were you thinking to simply move any comments befo= re the field, in each case where we're adding an annotation?
=
Separately I've been thinking how we could best ha= ve a discussion/review on whether the jumbling of specific plan struct fiel= ds is correct. I was thinking maybe a quick wiki page could be helpful, not= ing why to jumble/not jumble certain fields?

Thank= s,
Lukas

--
<= div dir=3D"ltr">
Lukas Fittl
--00000000000039f1e0062cf9b3a8--