Re: Refactor handling of database attributes between pg_dump and pg_dumpall
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Haribabu Kommi <kommi.haribabu@gmail.com>
Cc: Vaishnavi Prabakaran <vaishnaviprabakaran@gmail.com>, Thomas Munro <thomas.munro@enterprisedb.com>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
Andreas Karlsson <andreas@proxel.se>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-10-26T11:01:32Z
Lists: pgsql-hackers
On Mon, Oct 23, 2017 at 7:36 AM, Haribabu Kommi <kommi.haribabu@gmail.com> wrote: > Apologies for not providing much details. > > pg_dumpall is used to produce the following statements for database, > > "Create database" (other than default database) or > "Alter database set tablespace" for default database (if required) > > ACL queries related to database > Alter database config > Alter database role config > > whereas, pg_dump used to produce only "create database statement". How about adding a new flag --set-db-properties that doesn't produce CREATE DATABASE but does dump the other stuff? -C would dump both CREATE DATABASE *and* the other stuff. Then you could dump built-in databases with --set-db-properties and others with -C. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Move handling of database properties from pg_dumpall into pg_dump.
- b3f8401205af 11.0 landed
-
Allow pg_dumpall to dump roles w/o user passwords
- 9a83d56b38c8 10.0 cited
-
Fix pg_dumpall to work for databases flagged as read-only.
- 4bd371f6f886 9.4.0 cited