Re: Refactor handling of database attributes between pg_dump and pg_dumpall

Vaishnavi Prabakaran <vaishnaviprabakaran@gmail.com>

From: Vaishnavi Prabakaran <vaishnaviprabakaran@gmail.com>
To: Haribabu Kommi <kommi.haribabu@gmail.com>
Cc: 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-09-29T04:44:33Z
Lists: pgsql-hackers
Hi,


On Sat, Sep 9, 2017 at 1:29 PM, Haribabu Kommi <kommi.haribabu@gmail.com>
wrote:

>
> Fixed patch is attached.
>


Patch applies and has lot of noise due to indent with spaces.
I did ran regression tests located in - src/test/regress,
src/test/modules/test_pg_dump, src/bin/pg_dump, src/bin/pg_upgrade folders
and no issues observed.



+      <term><option>--enable-pgdumpall-behaviour</option></term>
+      <listitem>
+       <para>
+        This option is for the use of <command>pg_dumpall</command> or
+        <command>pg_upgrade</command> utility to dump the database objects
+        by <application>pg_dump</application> for a complete dump.
+        This option can only be used with <option>-C/--create</option>.
+        Its use for other ourposes is not recommended or supported.
+        The behavior of the option may change in future releases without
notice.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>

s/ourposes/purposes/


Option name "--enable-pgdumpall-behaviour"  is very generic and it is
better to rename it to something that reflects its functionality like
--skip-default-db-create/--no-default-db-create

Thanks & Regards,
Vaishnavi,
Fujitsu Australia.

Commits

  1. Move handling of database properties from pg_dumpall into pg_dump.

  2. Allow pg_dumpall to dump roles w/o user passwords

  3. Fix pg_dumpall to work for databases flagged as read-only.