Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gjBDt-0006T1-Aw for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Jan 2019 23:00:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gjBDr-0003GA-0V for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Jan 2019 23:00:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gjBDq-0003Fr-Op for pgsql-hackers@lists.postgresql.org; Mon, 14 Jan 2019 23:00:46 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gjBDi-0002yW-Bh for pgsql-hackers@postgresql.org; Mon, 14 Jan 2019 23:00:45 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id AC2FD11699706 for ; Mon, 14 Jan 2019 16:00:35 -0700 (MST) Date: Mon, 14 Jan 2019 16:00:35 -0700 (MST) From: legrand legrand To: pgsql-hackers@postgresql.org Message-ID: <1547506835703-0.post@n3.nabble.com> In-Reply-To: <5396e093-ed6b-5962-2ed5-337a0425160b@2ndquadrant.com> References: <23164510-3f59-3289-3b32-9c8643711a6c@gmail.com> <5396e093-ed6b-5962-2ed5-337a0425160b@2ndquadrant.com> Subject: Re: explain plans with information about (modified) gucs MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tomas Vondra-4 wrote > Hello Sergei, > >> This patch correlates with my proposal >> "add session information column to pg_stat_statements" >> https://www.postgresql.org/message-id/3aa097d7-7c47-187b-5913-db8366cd4491%40gmail.com >> They both address the problem to identify the factors that make >> different execution plans for the same SQL statements. You are >> interested in the current settings that affect the execution plan, I'm >> concerned about historical data in pg_stat_statements. From my >> experience the most often offending settings are >> current_schemas/search_path and current_user. Please have in mind that >> probably the same approach that you will use to extend explain plan >> functionality will be eventually implemented to extend >> pg_stat_statements. > > Possibly, although I don't have an ambition to export the GUCs into > pg_stat_statements in this patch. There's an issue with merging > different values of GUCs in different executions of a statement, and > it's unclear how to solve that. > > [...] > > -- > Tomas Vondra http://www.2ndQuadrant.com > PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services This explain with GUCs feature can be included very easily for historical data management in pg_store_plans or pg_stat_sql_plans extensions (that both use a planid based on the normalized plan text). Regards PAscal -- Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html