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 1ti3mN-00AhGv-5y for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Feb 2025 03:51:15 +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 1ti3mJ-003SnQ-5p for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Feb 2025 03:51:11 +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 1ti3mI-003SnH-Pi for pgsql-hackers@lists.postgresql.org; Wed, 12 Feb 2025 03:51:11 +0000 Received: from mail-ot1-x32d.google.com ([2607:f8b0:4864:20::32d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ti3mE-000N9x-21 for pgsql-hackers@lists.postgresql.org; Wed, 12 Feb 2025 03:51:11 +0000 Received: by mail-ot1-x32d.google.com with SMTP id 46e09a7af769-726e56adc00so1140595a34.0 for ; Tue, 11 Feb 2025 19:51:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739332265; x=1739937065; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=fOTUr48xg2qJdPq8cREwt7aL04LQUJ5HCGq8PYr9QCI=; b=PRrb2pg8Yfsn7hEXjpt6w+/7VguprBALScwP4rqGtXvW0WF1jgU9PwgAxIR14sUfWw ojihAoc3HLsgwYwxzKcUm42aDl7ESAOgo3K1kq0YG+Z3FA6+z6/YL6csK0zKKkR8LyHI 50mUHJ6PUE35zpmm+kLCKQZh+1rvs585zGDMmOTu6gQCEeiGvpa61VtpwhivyXOePDQR hCwmOe2h98Xte+jRxtHzSd6FFZIXAlgZ3x3dP+fckfaVdnr+cklWnMUK1zb0fmRtzoSt dN3loLHnGedT2prkDHUaE2xWOP25EMdAcsHSbMV1ZU1gCea8ktyEZUG8CYk0PWaO4zU1 Q54A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739332265; x=1739937065; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fOTUr48xg2qJdPq8cREwt7aL04LQUJ5HCGq8PYr9QCI=; b=gC89ohWi04UPrvB8fwy224zrcoXqMQRMCJCGTfoFyWF3vMvU47mLgQi2j1KIlUWwns efJHq12FtGC/QF//aaC8vCWJcLHtCJrKoGrQ+hxlwRDqKIuyYf475mWx6wrQRpiLhyrQ OLrZGXQdFCb/o8YxLwOwlEFcsqQxfyUNBPRmzyIrDMMi8oRVvGwwh8rB9zdIGQieAEFH nFEkQETTKTUXp9xNQyKO8K6YREoaKgcFTiD5mnwOZ2jRUKd+N53eRFNnwlnep9/Jt7zz KyrRFNzDQqvHcD7p87nXGIPofPnRKeDGLU2xDEKd+VWni3IO1xhWsZb0VHtKGFrsbWEb 0pNw== X-Forwarded-Encrypted: i=1; AJvYcCWATUVSaf9QooYoTQxcnjmQ+WwMpgEEZBkU8SG2o3DdrQpGc+t6vxsE2pV+s+RYcDMRTESx54gjtNZhUS3R@lists.postgresql.org X-Gm-Message-State: AOJu0YygyqpwGW5gbKTKbVVRMIQUUvzRGUUpaBUbibX4Nriw0YwmMH93 bRj5GNsVp1PI+SafVeqR0V83muHgeWfewlyIChyOk6gRsLboxxtJwMvsaQ== X-Gm-Gg: ASbGncs45uJnXxIVCRO+zET5Aothrn8CGMezr3GvCa2u647C7QB3JB6ec8/2jqqc/vx JcbO6D0F1CCQZl7jVNI1iDq3SbYVzogfPrKUIbgUkGrEAxgu3edIM8yNzuiuBNBeTd01DHzXfHs zz5zAtlabi9py/tMhyzMPRmmwjiN5i3zuuqjL/pdoFm6yNWB8vk4QZOAYu6U+zPhzsVMH5Y0gf6 oKEjTPGTCnUW4ou9PpbsmEpW28oXU8S18V8qflCVG3hc5r3ANu16VimF6OOFbEhxfZvcOgdtDr7 CP0R9Yw= X-Google-Smtp-Source: AGHT+IE4aXmbsSGfTx+OblsbGbhDQB38oy39RrzeAH0zSq739ursy/I6tgUY/LXGeE5Clb/RNHBNjw== X-Received: by 2002:a05:6a21:618f:b0:1e1:9fef:e960 with SMTP id adf61e73a8af0-1ee5c733361mr3204207637.6.1739332254197; Tue, 11 Feb 2025 19:50:54 -0800 (PST) Received: from jrouhaud ([115.43.41.38]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ad54bca7d0csm5055095a12.58.2025.02.11.19.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 19:50:53 -0800 (PST) Date: Wed, 12 Feb 2025 11:50:47 +0800 From: Julien Rouhaud To: Sami Imseih Cc: Michael Paquier , Lukas Fittl , PostgreSQL Hackers , Marko M , Alvaro Herrera Subject: Re: [PATCH] Optionally record Plan IDs to track plan changes for a query Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Feb 11, 2025 at 08:57:46PM -0600, Sami Imseih wrote: > > 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. Well, the ability for extensions to override the actual queryid calculation was the result of more than half a decade of strong disagreements about it. And I'm definitely not volunteering to reopen that topic :)