Re: Changing pg_dump default file format

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Changing pg_dump default file format
Date: 2013-11-07 16:21:03
Message-ID: 1383841263.98720.YahooMailNeo@web162902.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joshua D. Drake <jd(at)commandprompt(dot)com> wrote:

> 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.

-1 in the case that output goes to stdout.  It might make sense for
when -f is specified.  As a DBA, 90% of my usage of pg_dump was
piped to psql, with the rest split between data-only dumps for
individual tables and schema-only dumps.  I think I used -Fc about
twice -- before I figured out how to do PITR-style backups.

This, for example, is a valid and useful construct:

pg_dump test | psql test2

... or:

pg_dump -s test | psql test3

A lot of scripts will be broken by changing the default format for
piped output.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-11-07 16:26:43 Re: Changing pg_dump default file format
Previous Message Andrew Dunstan 2013-11-07 16:17:06 Re: Changing pg_dump default file format