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 1thZz9-004CQo-NW for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Feb 2025 20:02:27 +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 1thZz8-004EGd-64 for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Feb 2025 20:02:26 +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 1thZz7-004EGU-QQ for pgsql-hackers@lists.postgresql.org; Mon, 10 Feb 2025 20:02:25 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1thZz4-0005wU-1p for pgsql-hackers@lists.postgresql.org; Mon, 10 Feb 2025 20:02:25 +0000 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-30761be8fa7so44072001fa.2 for ; Mon, 10 Feb 2025 12:02:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739217742; x=1739822542; 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=VxYNNLPsMO+S0pv7DatxTjqEn4l5L8eSY2ZvXhbJvXY=; b=ipEXc+V5AQE6XDayZUki6nI6i6S7EjcyDqTrHAC5hKqSoY4C9rLgKn1uxhYioNSRKz zI4jlOQ/WiuyDvOTgWEfzRnb43axw/Po8vHtaiw5mR2FDPJfaxmfaHQqOuDT5FUFqinx fYUdfBtqyRLndnsZSrZsxxLyXzWFrGrgjyNokme7dYvVkVNzdbC6nlYGp9OKbzbdO0lt xlrhukJX++lNNCxfOE9noI/ysgRydpouz7jHeptb4AvRjAEC7v8SFy7MmqO9rj+XKi09 7Exgv2/c1wWb+owvGD2h1cYFBQyyPoNlQBbmSc7+wQWsCl4ojSOyNWdSHJD1mevOO1uf Bx6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739217742; x=1739822542; 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=VxYNNLPsMO+S0pv7DatxTjqEn4l5L8eSY2ZvXhbJvXY=; b=dh921FCMeEIeFKptgYomJEBD9wqwTahxcdGBonpb5J5Vbf3ZSpKe8qD3TIfnAAn4iq aohfUS9gIAF7fS0pTuAqJCVxfpC1YuC4uAVsB9KC6Xnnp0hYgaNr+Nq27ubomaRPweRv Co3a7VgRyl6yjmZh6tYOayXIHfGdl4AjkwChtw0yg6GgQwYGcUPVBOyppnIh3OBnZmXH VDkJh+wsVM2PtaPo3ED08g91yrPIwAKofHEkRpSJ2BSlWbiksUTyfecprkVuvut2bx3g G+RpYAQhz3y5Q2D8inWXtVDVdCBLDSlV+tfEHN2YGLfWIZcNI47l7ebPWaSO2wecWOP3 r3lw== X-Forwarded-Encrypted: i=1; AJvYcCV7SnOCKTZgp6zeivBHUiBtXgyT8GXRCud/9v/3NXh4Z8flaceioj6b4BkACRUDS15tJyecs3/XSyt8rOwM@lists.postgresql.org X-Gm-Message-State: AOJu0Yx0l1x81IDlU+XZfleAEZIKb3nmEoBIrFqsd1I4Oq3Oe8hNOH2e cDEx+3LtDYvTpRRFyAADyftU/Mb4lWAE2aKFfoY8gRxywEgeTMiOqXSSA5/hmZP+ivGmOjv6htB i5CcjXyeLv8Fzvsl2mDI0UD1CVT4kjQ8m X-Gm-Gg: ASbGncsijYfW1uCYf22CQhzLkKS8JTwTGefTqceSGNuk1KdvmwLtbBVDeOUW5Wf7lna tG4SsuwiYeeCmuBzWpPaoH6BMCmBVNAotkzZPuh8TT55Rcv5fyMFPVb+whmrlIgmsVKUiGJFLsQ == X-Google-Smtp-Source: AGHT+IE023nXtMQePQT04W8FUOBz//X5T7Bm7VnbA0sw7Q1qE/yiwkpNnGUtux49alT0+Zxd8rcHQ9AhFSo9fKawo18= X-Received: by 2002:a2e:bd14:0:b0:302:360e:a153 with SMTP id 38308e7fff4ca-307e5b8d6e3mr41804941fa.36.1739217742076; Mon, 10 Feb 2025 12:02:22 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Sami Imseih Date: Mon, 10 Feb 2025 14:02:10 -0600 X-Gm-Features: AWEUYZkHrnrnetHv5ZacYBGx-CfAwJkkfESaWNtj-oME6UctpZZzMU1mLI7JIRg Message-ID: Subject: Re: [PATCH] Optionally record Plan IDs to track plan changes for a query To: Michael Paquier Cc: Lukas Fittl , PostgreSQL Hackers , Marko M Content-Type: multipart/mixed; boundary="000000000000b4aa02062dcf2fdd" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000b4aa02062dcf2fdd Content-Type: text/plain; charset="UTF-8" > This fixes the long comments in plannodes.h to make it easier to add the > attribute annotation. It made the most sense to make this the first patch > in the set. > A commit that happened last Friday made also this to have conflict. Thanks for committing v5-0001. I am not sure why there is comment that is not correctly indented. Attached is a fix for that > I don't understand why there is a need for publishing AppendJumble() > while it remains statis in jumblefuncs.c. This is not needed in 0003 > and 0004, either. In v5-0002, AppendJumble is no longer static. -static void +void AppendJumble(JumbleState *jstate, const unsigned char *item, Size size) { Maybe I am missing something? > Should we use more generic names for the existing custom_query_jumble, > no_query_jumble, query_jumble_ignore and query_jumble_location? Last > time I've talked about that with Peter E, "jumble" felt too generic, > so perhaps we're looking for a completely new term? This impacts as > well the naming of the existing queryjumblefuncs.c. The simplest term > that may be possible here is "hash", actually, because that's what we > Point is that query_jumble_ignore is used in the planner nodes, which > feels inconsistent, so perhaps we could rename query_jumble_ignore and > no_query_jumble to "hash_ignore" and/or "no_hash", or something like > that? This may point towards the need of a split, not sure, still the > picture is incomplete. I was thinking about this as I was reworking the comments in jumblefuncs.c for v5-0002. I am OK with moving away from "jumble" in-lieu of something else, but my thoughts are we should actually call this process "fingerprint" ( a term we already use in the queryjumblefuncs.c comment ). A fingerprint consists of all the interesting parts of a node tree that are appended and the final product is a hash of this fingerprint ( i.e. queryId ) For node attributes we can specify "fingerprint_ignore" or "no_fingerprint". What do you think? > The concept of location does not apply to plans, based on the > current proposal, so perhaps we should talk about "query normalization > location"? Are you referring to JUMBLE_LOCATION? and whether to keep it in queryjumblefuncs.c ( or jumblefuncs.c as is being proposed )? Regards, Sami --000000000000b4aa02062dcf2fdd Content-Type: application/octet-stream; name="v1-0001-Fix-comment-indentation.patch" Content-Disposition: attachment; filename="v1-0001-Fix-comment-indentation.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_m6zh6z540 RnJvbSBhMjU2MDA2NjkxYWJlZDNlYjNlNDAxZTVmYjlmYjMwZTA4ZDFmMTlhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiAiU2FtaSBJbXNlaWggKEFXUykiCiA8c2ltc2VpaEBkZXYtZHNr LXNpbXNlaWgtMWQtMzk0MGI3OWUudXMtZWFzdC0xLmFtYXpvbi5jb20+CkRhdGU6IE1vbiwgMTAg RmViIDIwMjUgMTg6MDE6MzEgKzAwMDAKU3ViamVjdDogW1BBVENIIHYxIDEvMl0gRml4IGNvbW1l bnQgaW5kZW50YXRpb24KCkZpeCBhbiB1bmluZGVudGVkIGNvbW1lbnQgaW50cm9kdWNlZCBpbgoz ZDE3ZDdkN2ZiNwotLS0KIHNyYy9pbmNsdWRlL25vZGVzL3BsYW5ub2Rlcy5oIHwgMiArLQogMSBm aWxlIGNoYW5nZWQsIDEgaW5zZXJ0aW9uKCspLCAxIGRlbGV0aW9uKC0pCgpk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