From: Frank van Vugt <ftm.van.vugt@foxi.nl>
To: pgsql-bugs@postgresql.org
Subject: minor annoyance - search_path not reset in/after dump/restore
Date: Mon, 27 Nov 2017 15:04:19 +0100
Message-ID: <3103514.ugGH0nFkBt@techfox> (raw)
L.S.
I'm not sure the following qualifies as a 'real' bug, but since it suprised me,
I'd like to raise it here, just in case it surprises others as well.
Postgresql version 9.6.6
The default value for the search_path is "$user", public.
Since I'm using schema's, my pg_dump files contain lines like this:
SET search_path = cnt_user, pg_catalog;
for each particular schema part in the dump.
However, at the end of the dump file, there's nothing to restore the
search_path to the default / last value.
This means that after restoring a dump via a psql console using a line like:
\i /tmp/daily-db-backup
the search_path value will be equal to that of the last schema restored...
This causes unexpected output of commands like '\d' afterwards.
Obviously, disconnecting/reconnecting 'fixes' things.
--
Thanks,
Frank.
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-bugs@postgresql.org
Cc: ftm.van.vugt@foxi.nl
Subject: Re: minor annoyance - search_path not reset in/after dump/restore
In-Reply-To: <3103514.ugGH0nFkBt@techfox>
References: <3103514.ugGH0nFkBt@techfox>
* 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