Re: BUG #14192: pg_dump/pg_restore omit setting search_path in restored db - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #14192: pg_dump/pg_restore omit setting search_path in restored db
Date
Msg-id 18195.1466000174@sss.pgh.pa.us
Whole thread Raw
In response to BUG #14192: pg_dump/pg_restore omit setting search_path in restored db  (buschmann@nidsa.net)
List pgsql-bugs
buschmann@nidsa.net writes:
> 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.

This is operating as designed: pg_dump dumps the content of a database,
not settings attached to the database object as such.  You can use
pg_dumpall (possibly with the -g switch) to capture that info.

There've been repeated discussions about refactoring this division of
labor, but nothing's been agreed to yet.

            regards, tom lane

pgsql-bugs by date:

Previous
From: buschmann@nidsa.net
Date:
Subject: BUG #14192: pg_dump/pg_restore omit setting search_path in restored db
Next
From: Joe Conway
Date:
Subject: Re: