From: buschmann@nidsa.net
To: pgsql-bugs@postgresql.org
Subject: BUG #14192: pg_dump/pg_restore omit setting search_path in restored db
Date: Wed, 15 Jun 2016 08:27:14 +0000
Message-ID: <20160615082714.5798.25003@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 14192
Logged by: Hans Buschmann
Email address: buschmann@nidsa.net
PostgreSQL version: 9.5.3
Operating system: Windows 10 64bit
Description:
To transport a whole database from Production to test/development I dump the
whole database with pg_dump -d xxxdb -Fc -f mydumpfile.dmp.
After creating the database on the target system with createdb I restore the
database with pg_restore -d xxxdb mydumpfile.dmp. (no other flags except
login information involved)
All Information is correctly restored (2 schemas and their content) except
the search path.
On the origin database I had entered
ALTER DATABASE xxxdb SET search_path TO public,partition2;
The restore omits setting the search path, it must be entered again with
ALTER DATABASE on the target machine.
The same occurs naturally also in the case of an emergency restore in case
of failure, which breaks the restore from running correctly without
expertise of the underlying database in time of restoration.
With my understanding, that the search path is an inherent part of the
origin database structure, the pg_dump/pg_restore sequence does not
completely reproduce the original database. I think this is a bug.
All is done on 9.5.3, 64bit Windows edition on Windows 64bit platforms, but
I suppose it is platform independent. I haven't tested it on different
versions or platforms.
I haven't tested whether pg_dump or pg_restore omits the setting (mostly
because of not using an SQL dump format).
Thanks for looking
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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: buschmann@nidsa.net
Subject: Re: BUG #14192: pg_dump/pg_restore omit setting search_path in restored db
In-Reply-To: <20160615082714.5798.25003@wrigleys.postgresql.org>
References: <20160615082714.5798.25003@wrigleys.postgresql.org>
* 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