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 1ueBjc-006BEM-I9 for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jul 2025 12:04:41 +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 1ueBja-007C7C-IO for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jul 2025 12:04:38 +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 1ueBja-007C74-98 for pgsql-hackers@lists.postgresql.org; Tue, 22 Jul 2025 12:04:38 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ueBjX-000DnD-1B for pgsql-hackers@postgresql.org; Tue, 22 Jul 2025 12:04:38 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4560d176f97so58266375e9.0 for ; Tue, 22 Jul 2025 05:04:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753185873; x=1753790673; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=43DFZhjGqWNN6DwW9empzZ0xWtIisTTihU3PdHHnN9A=; b=IDbLpCopipBFb7sUD52wNfThFvDQDKW6iiiJCGXC63WzFdKYL4VUSIa3Q2fWjL51kG OlTX0ZuwjJvkKji5SXQmfEqiKpOZGslXqzzivugpnTAeS2iQMgwgIAdWlLPXZsAXakBa qL82yf/PNdk+NLz0tZnfLTRNo6QLUI4/0KtbNfss2xLl0+9DPAzs6xF8rHQnsxS61nzB asJhCt93JP7jEdvO/q6UxSw1lcOWathDb4x0WgnIj7Wd3alx4NCKsq7x1wGc7OomyNZO AQ4rJFQuGja1ter+XtWeRLW5bGFTrjWw3gBdVsJObfv+COvGOhf4PFLnlJcyV5SdOehC UyXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753185873; x=1753790673; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=43DFZhjGqWNN6DwW9empzZ0xWtIisTTihU3PdHHnN9A=; b=GKsGFhUviIq/B1himwZY8hvsQntFCc93nvN6Y7XLMKRnTVDfowfV6vtWrzdLFqJbDA BzA7QAf397Uzao13XH0NKgoVBHLIPAF+hXds1gv+iknjIhqgK6DdhhSMJC7Ej0WjcxCz HugKXwtwb5R/n0mnf1KrzNHm+uC1jBiQXGFfmOLQlFJOeOBrSIUOnd/CPeNYimV2vaGs fR/YVI9gvzguyTvtltLaG2n2VhM2yn6Gju4D8yTpYD4qN7Fdd8jRrcWldPifZb7HDK2M NIyXBEODp4xkp2iZqJzqRUjSXX+7r8aXjUM4qdGc49hgjnexS6MB2v5laJiWKsHlodmK K03A== X-Forwarded-Encrypted: i=1; AJvYcCWDyRMfbO6K77HrRIE6uwtYz/lxkBM/khCPMlu+x7lPGSUbVSowI0Xv2t1yPduPtLM5nwyGTH/W0Jjr4shA@postgresql.org X-Gm-Message-State: AOJu0YzyGATYvXI3S1VuVSGl1F2Mwy+JiEQO1mCeY/9qd7h/WGWBL7F+ 2kEV8R6IXlRPcOMaoBtm+qJXhHTVb+a0w5RVyDsU0SWnnDrzzcoxPZ83 X-Gm-Gg: ASbGncuWK9pbSvNU+CX+0dOweEcKpSzFG6RxIBdgJMITwTK54LnA/ClRczm71alRiLl s9OQDIe6Ws9xeCqS9SV0EA7RNGUAnnNUOnqr1pr8l8J+hrWvz1c6fdGvBrrLa03xy+MJWPpdAT7 HphxiHIDnRcRgctufMOuIH5nzUGW6vxmG9Z+oNQ0Wxh0tA7bBZ3xYTgffG4yF6cLMqmmyNZNLDj 3Wd6obcz4HTGnrPJtusRifcmaGWAtz65nPPFJByTad588qkKKhN+50JywsHVYO1Z/1FLsiP3ftP Gu5Q8Gn16LHyEt4h7u7PEWfb9N/T82nCkr9QanQTf+VyUTY9DumiauyGZPqG25HzP9iLLTC1qla OA312ZwbKt3Ge3vXtTqN6qt0vcqo1SETENA== X-Google-Smtp-Source: AGHT+IGf11vYitP22Wv7hgKzVbG0u2fiVGyENq2FfgrDJEqTeMs1O4bFxS6yJ5YAxSgHD6rb9IaFBA== X-Received: by 2002:a05:6000:3113:b0:3a4:cb4f:ac2a with SMTP id ffacd0b85a97d-3b60e4c225fmr18086592f8f.21.1753185873259; Tue, 22 Jul 2025 05:04:33 -0700 (PDT) Received: from [192.168.15.242] ([80.251.191.198]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b61ca4d755sm13129658f8f.68.2025.07.22.05.04.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Jul 2025 05:04:32 -0700 (PDT) Message-ID: <03f82e6f-66a3-4c4d-935c-ea4d93871dc1@gmail.com> Date: Tue, 22 Jul 2025 14:04:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: track generic and custom plans in pg_stat_statements To: Sami Imseih , Michael Paquier Cc: Ilia Evdokimov , Greg Sabino Mullane , pgsql-hackers , Nikolay Samokhvalov References: <1d667f28-c739-417b-b024-7f5c1004a008@tantorlabs.com> <60f09467-bfe6-49bc-a47a-fe887050a23a@tantorlabs.com> Content-Language: en-US From: Andrei Lepikhov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 22/7/2025 01:22, Sami Imseih wrote: >> Note: the size of the change in pg_stat_statements--1.12--1.13.sql >> points that we should seriously consider splitting these attributes >> into multiple sub-functions. > > So we don't lose track of this. This should be a follow-up thread. I do > agree something has to be done about the exploding list of attributes > in pg_s_s. +1 Not once I encountered people who want to track only a specific number of parameters and do not have much fun burdening themselves with all the data set, querying a whole huge stat view to analyse performance profiles. In another scenario, an extension needs to track a limited number of parameters - let's say, blocks hit and blocks read. Another dimension - sometimes we are only interested in queries that involve complex join trees or partitioned tables and would be happy to avoid tracking all other queries. It seems that a callback-based or subscription-based model could be worth exploring. -- regards, Andrei Lepikhov