On Sun, Mar 15, 2026 at 12:49 AM Mahendra Singh Thalor <mahi6run@gmail.com> wrote:
Hi all,
I was doing some tests with pg_dump, pg_dumpall and pg_restore tools. With "pg_dumpall --data-only --clean", we are reporting an error after dumping some data.
pg_dump: error: options -c/--clean and -a/--data-only cannot be used together pg_dumpall: error: pg_dump failed on database "template1", exiting
Error is coming from pg_dump but it should come from pg_dumpall without any dump.
Here, I am attaching a patch to fix this problem. Please review this.
+1 for the fix , as it immediately throws an error in pg_dumpall itself, instead of going through all the way until pg_dump and then finding out it's not a correct combination of options.
I have reviewed,tested the patch , except these it LGTM. 1) maybe match the pg_dumpall comment with the pg_dump comment. 2) please fix the indentation using pgindent