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

Re: packaging Postgres binary dump files



Re: Paul Wise 2013-09-20 <[🔎] CAKTje6H+3YuHOo3Tr39yuCubjdZD08XOcVUu=02TvTtX9x1OZw@mail.gmail.com>
> The format doesn't appear to be very efficient, the plain SQL commands
> are much smaller:
> 
> pabs@wagner:~$ pg_restore -l postbooks_empty-4.1.0.backup > foo.sql
> pabs@wagner:~$ ls -Ssh
> total 5.6M
> 5.3M postbooks_empty-4.1.0.backup  344K foo.sql

pg_restore -l will just give you the listing of what's inside the dump
file, not the actual contents.

> It doesn't seem possible to treat it as a compressed tarball:
> 
> pabs@chianamo ~ $ tar zxf postbooks_empty-4.1.0.backup

That'd be "pg_restore postbooks_empty-4.1.0.backup".

(Note that there is also a "tar" format that "pg_dump -Ft" will
create, but that format is crap because it needs to create a tempfile
somewhere first. These "binary" or "custom" dumps that "pg_dump -Fc"
creates are much more flexible to use because you can stream them when
writing, while at the same time getting a TOC for random read access
later.)

Christoph
-- 
cb@df7cb.de | http://www.df7cb.de/

Attachment: signature.asc
Description: Digital signature


Reply to: