Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YOpMO-0000oh-51 for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Feb 2015 15:19:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YOpMN-00050e-LY for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Feb 2015 15:19:19 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YOpMM-00050Y-FR for pgsql-hackers@postgresql.org; Fri, 20 Feb 2015 15:19:18 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YOpMJ-0006vK-Hn for pgsql-hackers@postgresql.org; Fri, 20 Feb 2015 15:19:16 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t1KFJCFp020850; Fri, 20 Feb 2015 10:19:12 -0500 From: Tom Lane To: Alexey Klyukin cc: Alexander Kukushkin , PostgreSQL-development Subject: Re: Report search_path value back to the client. In-reply-to: References: Comments: In-reply-to Alexey Klyukin message dated "Fri, 20 Feb 2015 10:15:56 +0100" Date: Fri, 20 Feb 2015 10:19:12 -0500 Message-ID: <20849.1424445552@sss.pgh.pa.us> X-Pg-Spam-Score: -2.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 Alexey Klyukin writes: > On Tue, Dec 2, 2014 at 5:59 PM, Alexander Kukushkin wrote: >> I would like to mark 'search_path' as GUC_REPORT: > Given this is a one-liner, which doesn't introduce any new code, but > one flag to the function call, would it be > possible to review it as a part of the current commitfest? I'm against this on a couple of different grounds: 1. Performance. search_path is something that many applications change quite a lot, so reporting changes in it would create enormous network overhead. Consider for example that a SQL function might set it as part of a function SET clause, and that could be invoked thousands of times per query. 2. Semantics. The existing GUC_REPORT variables are all things that directly relate to client-visible behavior, eg how values of type timestamp will be interpreted and printed. search_path is no such thing, so it's hard to make a principled argument for reporting it that doesn't lead to the conclusion that you want *everything* reported. (In particular, I don't believe at all your argument that this would help pgbouncer significantly.) We could possibly alleviate problem #1 by changing the behavior of guc.c so it doesn't report every single transition of flagged variables, but only (say) once just before ReadyForQuery if the variable changed in the just-finished command. That's not exactly a one-line fix though. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers