Re: Report search_path value back to the client.
Oleksii Kliukin <alexk@hintbits.com>
From: Alexey Klyukin <alexk@hintbits.com>
To: Alexander Kukushkin <cyberdemn@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2015-02-20T09:15:56Z
Lists: pgsql-hackers
Hi,
On Tue, Dec 2, 2014 at 5:59 PM, Alexander Kukushkin <cyberdemn@gmail.com> wrote:
> It's really crazy to keep so many (hundreds) connections to the database and
> it would be much better to have something like pgbouncer in front of
> postgres.
> Right now it's not possible, because pgbouncer is not aware of search_path
> and it's not really possible to fix pgbouncer, because there is no easy way
> to
> get current value of search_path.
>
> I would like to mark 'search_path' as GUC_REPORT:
> --- a/src/backend/utils/misc/guc.c
> +++ b/src/backend/utils/misc/guc.c
> @@ -2904,7 +2904,7 @@ static struct config_string ConfigureNamesString[] =
> {"search_path", PGC_USERSET, CLIENT_CONN_STATEMENT,
> gettext_noop("Sets the schema search order for names
> that are not schema-qualified."),
> NULL,
> - GUC_LIST_INPUT | GUC_LIST_QUOTE
> + GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_REPORT
> },
> &namespace_search_path,
> "\"$user\",public",
>
I know quite a lot of companies using search_path to switch to the
version of sprocs in the database
without changes to the application. Not being able to use pgbouncer in
such scenario is rather annoying.
It would be really great to have this functionality in the upcoming
9.5 and not wait for another year for it.
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?
Kind regards,
--
Alexey Klyukin
Commits
-
Document that search_path is reported by the server
- 0d06a7eac4b2 18.0 landed
-
Mark search_path as GUC_REPORT
- 28a1121fd912 18.0 landed
-
Avoid spamming the client with multiple ParameterStatus messages.
- 2432b1a04087 14.0 cited
-
Mark application_name as GUC_REPORT so that the value will be reported back
- 59ed94ad0c9f 9.0.0 cited