pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: ALTER ROLE SET search_path produced by pg_dumpall gives : ERROR: syntax error at or near "$" .
Date: Wed, 1 Aug 2018 17:56:04 +0300
Message-ID: <44a9ab3c-8bde-6a27-cd99-1f2889288a6d@matrix.gatewaynet.com> (raw)
In-Reply-To: <25764.1532959236@sss.pgh.pa.us>
References: <b834e08c-fa94-5823-932e-2073ea805e98@matrix.gatewaynet.com>
	<25259.1532958693@sss.pgh.pa.us>
	<3632eeb3-d655-606c-ce31-c3035043a5b1@matrix.gatewaynet.com>
	<25764.1532959236@sss.pgh.pa.us>

On 30/07/2018 17:00, Tom Lane wrote:
> Achilleas Mantzios <achill@matrix.gatewaynet.com> writes:
>> On 30/07/2018 16:51, Tom Lane wrote:
>>> Hm, that's not happening for me:
>> You (and Adrian) are right. This is due to our own tweaking (which I had forgotten). Sorry for the false alarm.
> It looks like your hack was to work around the bug that was fixed
> properly in 742869946.  You should be able to undo that now ...
Hello Tom,
On pgsql 10.4 , I reverted (undid) this patch/hack :

root@smadev:/usr/local/src/postgresql-10.4# diff -u ./src/backend/utils/misc/guc.c ./src/backend/utils/misc/guc.c.hack
inline patch 1: ./src/backend/utils/misc/guc.c.hack (+1/-1 lines) download inline-1.patch--- ./src/backend/utils/misc/guc.c      2018-08-01 16:22:30.901629000 +0300 +++ ./src/backend/utils/misc/guc.c.hack 2018-08-01 15:45:15.893348000 +0300 @@ -3266,7 +3266,7 @@                 {"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_REPORT                 },                 &namespace_search_path,                 "\"$user\", public",
And (i.e. with stock 10.4) I tested with pgbouncer again in transaction mode, and still, (i.e. without GUC_REPORT) , pgbouncer client does not get from server and does not store the search path after the first server connection, and therefore, after server disconnects , the second time the client tries to connect it does not set the search_path . I tested with : GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_REPORT as well, but then I get the re-quote problem I was telling about : At first connection the search path is set correctly : bdynacom,epaybdynacom,epay,"$user", public but after server disconnection and re-connection the search path becomes : "bdynacom,epaybdynacom,epay,""$user"", public" which is wrong. So in order to retain all the benefits of transaction mode in pgbouncer I had to re-apply the first patch/hack, at the expense of the nuisance at pg_dumpall and search paths. > > regards, tom lane > -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt

view thread (8+ messages)  latest in thread

Message-ID: <44a9ab3c-8bde-6a27-cd99-1f2889288a6d@matrix.gatewaynet.com>
Permalink:  ../44a9ab3c-8bde-6a27-cd99-1f2889288a6d@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/44a9ab3c-8bde-6a27-cd99-1f2889288a6d@matrix.gatewaynet.com

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: achill@matrix.gatewaynet.com
  Subject: Re: ALTER ROLE SET search_path produced by pg_dumpall gives : ERROR: syntax error at or near "$" .
  In-Reply-To: <44a9ab3c-8bde-6a27-cd99-1f2889288a6d@matrix.gatewaynet.com>
  References: <b834e08c-fa94-5823-932e-2073ea805e98@matrix.gatewaynet.com> <25259.1532958693@sss.pgh.pa.us> <3632eeb3-d655-606c-ce31-c3035043a5b1@matrix.gatewaynet.com> <25764.1532959236@sss.pgh.pa.us> <44a9ab3c-8bde-6a27-cd99-1f2889288a6d@matrix.gatewaynet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox