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 1ti2wv-00AVLI-3c for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Feb 2025 02:58:05 +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 1ti2ws-00366g-TZ for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Feb 2025 02:58:03 +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 1ti2ws-00366W-K0 for pgsql-hackers@lists.postgresql.org; Wed, 12 Feb 2025 02:58:03 +0000 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ti2wr-000KoX-1K for pgsql-hackers@lists.postgresql.org; Wed, 12 Feb 2025 02:58:02 +0000 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-30613802a59so61475821fa.0 for ; Tue, 11 Feb 2025 18:58:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739329079; x=1739933879; 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=khA9HjonFsgoaE7er8pUxlrTfhQHm+SunXGQXBLuvr8=; b=KTyrTyKMsrL438zB+Uw+Gr2sG0UH+iv6zs12xYiLCBzgbnbb3bp1MFtWkGbC0JfY7P 9lPEtyLgjeGj9wQENrhiDvOWmlos9OyKiJDLYqnZThb9gas07F4tRanrhranv9CfauAG 0XTMoZZMLHrwb8iJpqg72gpyirDXAPSY70sLlVSwzEFXl+3BjKoaUitOeYXnnl0uW/DW G9TA7BfVUXYX9fyut5ZF4SvVyejkgIni4/C5J1cD+cO+IXpx7kalmlUTzWGIIpvJTZ+t f9Siaitogtp/TPsm91tfr5Hmr/lyHVeEobxK6k+K8EoT2vC7wHRzGsE7eCyjym4j5U5i iHgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739329079; x=1739933879; 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=khA9HjonFsgoaE7er8pUxlrTfhQHm+SunXGQXBLuvr8=; b=HgjPNX0A8TGr7UQbXRYe4G0uCA8IufYjgDyn0jdUNlY0HAZDiDb3bBQ8jrdDXWM2lz FZYm5SU8lJat/tRl3Nl4FjUS+MpYmRA9i+mFlNpAIVPFZ+euJZeoPIIb1VkSrzBNspu0 PhqM+Vc4wsf14SOccW/XbBoKY5WI2naNusmPDsopWkVYPeefib9Zbc1+QcE/ZJxIeI68 iIC/5BoC4g56hBYEBii+gHCLhHrpw0w8EJS/a11E49s/ozkvRYOZ7zuUJWRa/y/plAsh plLuBTzlZEZQ0JKgcp0vymt4swTe+p+cgQ/BFwFaqPoDMEUZ3Zj0IXmtds+ka9oIjjkk liHw== X-Forwarded-Encrypted: i=1; AJvYcCX7el3h9t/uuH9gZ5E2qcFz19I7ZnHnmAh+BiIh/8S8VBoVv0vM5aycDwdFpSx+ngMIg3G9OJ5Pch/BpqHT@lists.postgresql.org X-Gm-Message-State: AOJu0Yx6er4cVcRwXDHFD8kcVOfCforRa8MaU6SWWaPtbw89tg6k//iB 3CgE4P6R7uwA4PE6Fcr70I9siNmCnlUEa4Rp0wK+2ZT/GAudi+zO+v6icX1mG2W89T/bhfEkQRr t4qLpo9zY/IovhOsmyOWSW8/9j6M= X-Gm-Gg: ASbGnctJNEFEsVoNQx056ux8USG9mNT4sBiHsLdmurr34gGgqvn7TnJAaep9NUn96Q9 fb5+vf5uKFaWXp4VKDlNiOBjQYm7h5KL/Y89QK+KBMQm/9qE2pGTLG3cVMxrXgWIxZBqN2Ps= X-Google-Smtp-Source: AGHT+IGehhAiDPvKDOrwSiqC/Wxr4xTOGXjEYKaVZCSyqGw+BScEUZwbDkbsI/rlV9FTYcgQkyxxyUq5B8hl80Zl25Y= X-Received: by 2002:a05:651c:507:b0:308:f5f0:c3fc with SMTP id 38308e7fff4ca-30903643368mr6063181fa.9.1739329078455; Tue, 11 Feb 2025 18:57:58 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Sami Imseih Date: Tue, 11 Feb 2025 20:57:46 -0600 X-Gm-Features: AWEUYZkVQA_xV1miqJj4maczdlj_8cTo1YAefAiwgVAg75nZEolsvrXwATvWlJM Message-ID: Subject: Re: [PATCH] Optionally record Plan IDs to track plan changes for a query To: Julien Rouhaud Cc: Michael Paquier , Lukas Fittl , PostgreSQL Hackers , Marko M , Alvaro Herrera Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > Of course some people may want to keep the current behavior, if they have > limited number of temp tables or similar, so I had a GUC for that. I don't > think that the community would really welcome such GUC for core-postgres, > especially since it wouldn't be pg_stat_statements specific. FWIW, I think options to tweak queryId computation is something that should be in core. It was discussed earlier in the context of IN list merging; the patch for this currently has the guc for the feature in pg_stat_statements, but there was a discussion about actually moving this to core [1] Giving the user a way to control certain behavior about the queryId computation is a good thing to do in core; especially queryId is no longer just consumed in pg_stat_statements. Maybe the right answer is an enum GUC, not sure yet. Specifically for the use-case you mention, using names vs OIDs in queryId computation is a valid use case for more than temporary tables, I can also think of upgrade, dump/restore, logical replication cases which can then allow for a consistent queryId. [1] https://www.postgresql.org/message-id/202502111852.btskmr7nhien%40alvherre.pgsql -- Sami