From: | Ronan Dunklau <ronan(dot)dunklau(at)dalibo(dot)com> |
---|---|
To: | pgsql-bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Dumping database creation options and ACLs |
Date: | 2014-12-08 09:45:57 |
Message-ID: | 5356359.VLpyF4Jg8x@ronan.dunklau.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hello.
Not sure if I should file this on pgsql-bugs or pgsql-hackers...
As of now, the only way to restore database options and ACLs is to use
pg_dumpall without the globals options. The often recommended pg_dumpall -g +
individual dumps of the target databases doesn't restore those.
Since pg_dump/pg_restore offer the ability to create the database, it should do
so with the correct owner, options and database ACLs.
There was some discussion about those issues a while ago (see
http://www.postgresql.org/message-id/11646.1272814212@sss.pgh.pa.us for
example). As I understand it, the best way to handle that would be to push
these modifications in pg_dump, but it is unclear how it should be done with
regards to restoring to a different database.
In the meantime, it would be great to add an option to pg_dumpall allowing to
dump this information. We could add the db creation in the output of
pg_dumpall -g, and add a specific --createdb-only option (similar to --roles-
only and --tablespaces-only).
Would such a patch be welcome ?
--
Ronan Dunklau
http://dalibo.com - http://dalibo.org
From | Date | Subject | |
---|---|---|---|
Next Message | zmokdad | 2014-12-08 10:39:25 | BUG #12181: Low Disk Space |
Previous Message | Heikki Linnakangas | 2014-12-08 09:26:03 | Re: pg_restore crashes passing NULL to strcmp (9.4 rc1) |