Re: pg_dump compress

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Roger Niederland <roger(at)niederland(dot)com>, depesz(at)depesz(dot)com
Subject: Re: pg_dump compress
Date: 2011-09-24 00:18:46
Message-ID: 201109231718.46881.adrian.klaver@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday, September 23, 2011 7:26:19 am Roger Niederland wrote:
> On 9/23/2011 6:46 AM, hubert depesz lubaczewski wrote:
> > On Thu, Sep 22, 2011 at 11:00:10PM -0700, Roger Niederland wrote:
> >> Using pg_dump from the command line with the exe included in windows
> >> 32 bit install in postgresql 9.1.
> >> pg_dump -U username -f somefile.sql.gz -Z 9 -i dbname
> >
> > please note that pg_dump --help shows:
> > -Z, --compress=0-9 compression level for compressed formats
> >
> > hint: the part "for compressed formats" is critical.
> >
> > plain dump is not compressed, you'd have to use -Fc to get compression,
> > but it's good to use anyway.
> >
> > Best regards,
> >
> > depesz
>
> On previous versions the -Z 9 option would compress the plain text sql
> output to a gzipped file.
> Now it now longer compresses. Using the -Fc the outputs a compressed
> file, which is only readable
> by pg_restore.

Seems there has been a code change in pg_dump.c that ignores compression level
for plain text.

From line 537:

/*
* Ignore compression level for plain format. XXX: This is a bit
* inconsistent, tar-format throws an error instead.
*/

The documentation has not caught up with this change.

>
> Roger

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message E-Blokos 2011-09-24 00:43:50 Re: about synchronous_standby_names or sync replic
Previous Message Timothy Garnett 2011-09-23 22:52:54 Documentation of what schema modifications cause what level of table locking