Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a3W0G-0002yW-1B for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Nov 2015 21:28:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a3W0F-0001Co-5N for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Nov 2015 21:28:55 +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_SHA384:256) (Exim 4.84) (envelope-from ) id 1a3Vyw-0008A4-32 for pgsql-hackers@postgresql.org; Mon, 30 Nov 2015 21:27:34 +0000 Received: from mimolette.dalibo.net ([212.85.157.144]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1a3Vys-0003BA-N1 for pgsql-hackers@postgresql.org; Mon, 30 Nov 2015 21:27:33 +0000 Received: from [192.168.0.2] (aur75-1-78-192-238-147.fbxo.proxad.net [78.192.238.147]) by mimolette.dalibo.net (Postfix) with ESMTPSA id 2715C1F103B0; Mon, 30 Nov 2015 22:27:28 +0100 (CET) Subject: Re: On-demand running query plans using auto_explain and signals To: Pavel Stehule , Tom Lane References: <32603.1444916567@sss.pgh.pa.us> Cc: "Shulgin, Oleksandr" , Simon Riggs , Robert Haas , Tomas Vondra , PostgreSQL Hackers From: Julien Rouhaud X-Enigmail-Draft-Status: N2010 Message-ID: <565CBF3C.7080106@dalibo.com> Date: Mon, 30 Nov 2015 22:27:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Hello, On 15/10/2015 16:04, Pavel Stehule wrote: > > > 2015-10-15 15:42 GMT+02:00 Tom Lane >: > > "Shulgin, Oleksandr" > writes: > > I was thinking about this and what seems to be the biggest problem is when > > to actually turn the feature on. It seems unlikely that someone will want > > to enable it unconditionally. Enabling per-backend also doesn't seem to be > > a good approach because you don't know if the next query you'd like to look > > at is going to run in this exact backend. > > Check. > > > What might be actually usable is poking pg_stat_statements for queryid to > > decide if we need to do explain (and possibly analyze). > > Hm, interesting thought. > > > Does this make sense to you? Does this make a good argument for merging > > pg_stat_statements and auto_explain into core? > > I'd say more that it's a good argument for moving this feature out to > one of those extensions, or perhaps building a third extension that > depends on both of those. TBH, none of this stuff smells to me like > something that ought to be in core. > > > There are few features, that I would to see in core: > > 1. possibility to get full SQL string > 2. possibility to get state string > > We can speak how to do it well. > I registered as reviewer on this, but after reading the whole thread for the second time, it's still not clear to me if the last two submitted patches (0001-Add-auto_explain.publish_plans.patch and 0002-Add-SHM-table-of-contents-to-the-explain-DSM.patch) are still needed reviews, since multiple refactoring ideas and objections have been raised since. Regards. -- Julien Rouhaud http://dalibo.com - http://dalibo.org -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers