Re: pg_dump and alter database - Mailing list pgsql-general

From
Subject Re: pg_dump and alter database
Date
Msg-id 64978.216.238.112.88.1061564091.squirrel@$HOSTNAME
Whole thread Raw
In response to Re: pg_dump and alter database  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_dump and alter database  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
> <btober@seaworthysys.com> writes:
>> The problem I have is that the SQL DDL and DML produced by pg_dump
>> fails to include the ALTER DATABASE ... SET search_path ... statement
>> that sets the search path for when I re-load the database from a dump
>> file.
>
> This functionality is in pg_dumpall, not pg_dump.
>
> (Whether that's the right place for it is debatable, perhaps.)

I thought maybe I overlooked that, however, I don't see any explicit
reference to this in man pg_dumpall.

I HAVE used pg_dumpall -g to make a backup of of users and groups, but
this output does not include the ALTER DATABASE commands. (I have not
used pg_dumpall to backup an entire database cluster, however.)

Does the ALTER DATABASE command get written only when I do an
unconditional pg_dumpall, i.e., produce a dump of all databases in the
cluster? If that is the case, then I do think the feature ought to be
included in pg_dump, because schemas would, I think, generally be
database-specific and not necessarily applicable to all databases in a
cluster, and so it would seem to make sense to have it in included in the
output from pg_dump, IMHO. Can that be made to happen? (Sorry that I
don't know enough about the PostgreSQL to take a stab at modifiying the
source code myself to implements this.)

~Berend Tober




pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Buglist
Next
From: Alvaro Herrera
Date:
Subject: Re: Schema