Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmwx4-0008G6-UQ for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Nov 2021 11:48:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mmwx3-00019I-SE for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Nov 2021 11:48:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmwx3-000199-Ic for pgsql-hackers@lists.postgresql.org; Tue, 16 Nov 2021 11:48:37 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmwwz-0002Ma-H2 for pgsql-hackers@lists.postgresql.org; Tue, 16 Nov 2021 11:48:37 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id E389C6079E; Tue, 16 Nov 2021 20:48:27 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.4 at oss.nttdata.com MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 16 Nov 2021 20:48:27 +0900 From: torikoshia To: Bharath Rupireddy Cc: Ekaterina Sokolova , PostgreSQL Hackers Subject: Re: RFC: Logging plan of the running query In-Reply-To: References: <0842b5da697a03869fb50be93817e4e1@oss.nttdata.com> <1c1590d3962cea6e06621da76677b5f3@oss.nttdata.com> <64f716c44629e303b66e6c24502147cc@oss.nttdata.com> <8b53b32f-26cc-0531-4ac0-27310e0bef4b@oss.nttdata.com> <7958d03fffe3bafcfe8a505145c63928@oss.nttdata.com> <9c4d9da6-48a5-fa18-4bff-f8eb0d4c9787@oss.nttdata.com> <59e6df324b41176d319f9c30bdb1d858@oss.nttdata.com> <0642712f-1298-960a-a3ba-e256d56040ac@oss.nttdata.com> <3d345c49561f31a1d8ff60ea86f88840@oss.nttdata.com> <2637b465ffc1568e6ef17d5b9c9d7c13@oss.nttdata.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <958b590c8195aa2b3b3c57755c40b3ba@oss.nttdata.com> X-Sender: torikoshia@oss.nttdata.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-11-15 23:15, Bharath Rupireddy wrote: > I have another comment: isn't it a good idea that an overloaded > version of the new function pg_log_query_plan can take the available > explain command options as a text argument? I'm not sure if it is > possible to get the stats like buffers, costs etc of a running query, > if yes, something like pg_log_query_plan(pid, 'buffers', > 'costs'....);? It looks to be an overkill at first sight, but these > can be useful to know more detailed plan of the query. I also think the overloaded version would be useful. However as discussed in [1], it seems to introduce other difficulties. I think it would be enough that the first version of pg_log_query_plan doesn't take any parameters. [1] https://www.postgresql.org/message-id/ce86e4f72f09d5497e8ad3a162861d33%40oss.nttdata.com -- Regards, -- Atsushi Torikoshi NTT DATA CORPORATION