Re: pg_restore - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_restore
Date
Msg-id 10697.1193615740@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_restore  (Thomas Kellerer <spam_eater@gmx.net>)
Responses Re: pg_restore  (Thomas Kellerer <spam_eater@gmx.net>)
List pgsql-general
Thomas Kellerer <spam_eater@gmx.net> writes:
> Why is it, that pg_dump can use a compressed output directly but pg_dumpall is
> always using a SQL (i.e. "plain text") output?

The custom and tar formats are not designed to support data from more
than one database.  At some point somebody should probably try to
improve that situation, but it's not immediately obvious what the
feature ought to look like.

If all you need is compression it's certainly easy enough:

    pg_dumpall | gzip >mydump.gz

    zcat mydump.gz | psql

So the argument for doing more hinges around the extra flexibility of
pg_restore to do selective restores and suchlike, and extending those
features to behave sanely for multi-database dumps is not trivial.

            regards, tom lane

pgsql-general by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: pg_restore
Next
From: Andreas
Date:
Subject: Re: Version 8.3