Re: pg_dumpall --roles-only interact with other options - Mailing list pgsql-hackers

From Zsolt Parragi
Subject Re: pg_dumpall --roles-only interact with other options
Date
Msg-id CAN4CZFMmwqysimp5=tTbF5_ie20+Ej-jjcsp1QubTrAS3tm4nw@mail.gmail.com
Whole thread
In response to Re: pg_dumpall --roles-only interact with other options  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: pg_dumpall --roles-only interact with other options
List pgsql-hackers
> Is there a reason we need to duplicate these checks in pg_dumpall when they
> are already handled by pg_dump?

Mainly I think it would be a nicer user experience to fail early
without generating additional output other than the error message
(currently it writes out 26 lines before the error), but there are
also two specific reasons why it would be an improvement:

* "--schema-only --no-schema" is already a contradiction before
pg_dumpall calls pg_dump: should it print out roles/tablespaces or
not? (it doesn't)
* if you specify "pg_dumpall --data-only -no-data -f dump.sql", or
redirect stdout to a file, it writes out a partial dump before
failing, and leaves it there. Users should check error messages and
exit codes, but the file is still there and could cause accidents. 3
simple checks could prevent this.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: ecdh support causes unnecessary roundtrips
Next
From: Kirill Reshke
Date:
Subject: Re: Buffer locking is special (hints, checksums, AIO writes)