Re: Changing pg_dump default file format - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Changing pg_dump default file format
Date
Msg-id CABUevExKPG8UccqdG0HGeW7Wmkgmx8bd8MkW7V=dsggYHW4vvg@mail.gmail.com
Whole thread Raw
In response to Changing pg_dump default file format  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: Changing pg_dump default file format  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Nov 7, 2013 at 5:02 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
>
> Hello,
>
> For as long as I can remember I have heard complaints about the fact that
> pg_dump doesn't use a backup format that is supported by the pg_restore
> program. At every single talk that I give that talks about pg_dump, the
> people in the majority of the audience agrees that this is rather silly and
> a barrier to usability.
>
> The only counter argument I have heard is that it adds an extra step for
> developers to get the SQL that generates a database. That to me is a weak
> argument as pg_dump is a production/admin too, first, not a developer tool.
>
> I humbly request on behalf of those who manage production postgresql
> instances that we change the default backup file format from -Fp to -Fc.

The main reason for keeping plain I guess goes with the fact that we
sent it to stdout by default, which really doesn't lend itself to the
custom format.

I'm a bit worried about it breaking peoples scripts as well, if they
pipe the output. In particular when doing a partial dump of say a
sigle table or such, and in my experience that's mostly done in
pipe-mode, which would break.

Though I have to say I like the idea in general :)

Maybe we could consider changing the default format if -f is specified
to write it directly to a file. OTOH, hat might just make it
confusing....

-- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/



pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Changing pg_dump default file format
Next
From: Andrew Dunstan
Date:
Subject: Re: Changing pg_dump default file format