[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: packaging Postgres binary dump files



On 20/09/2013 10:59, Chow Loong Jin wrote:
> On Fri, Sep 20, 2013 at 09:07:48AM +0200, Paul Wise wrote:
>> > On Thu, Sep 19, 2013 at 2:42 PM, Daniel Pocock wrote:
>> > 
>>> > > PostBooks distributes their schema as a Postgres binary dump file for
>>> > > use with pg_restore
>> > 
>> > What is their reason for using the binary format? Could they be
>> > convinced to switch to or add something more normal like compressed
>> > SQL?
> Just speaking for myself here, but I find that the binary format is more
> flexible in that pg_restore can selectively restore things, generate DROP ____
> statements, restoring things in parallel and such. All in all, the binary format
> seems much more useful than the SQL format.
> 
> You can also compress the binary format (pg_dump -Z0..9), but it still isn't as
> efficient as SQL compressed with xz -9.

The binary format is the preferred one for dumps because allows to
selectively restore only parts of a database. Doing the same kind of
manipulation using an SQL script requires a lot of proficiency in
sed/awk/perl and regular expressions. Yes the format is binary but given
that the tools to manipulate it are completely free and already
available in Debian why distribute a less useful version of the same data?

federico

-- 
Federico Di Gregorio                         federico.digregorio@dndg.it
                           Don't dream it. Be it. -- Dr. Frank'n'further

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: