Re: pg_dump compress

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: pg_dump compress
Дата
Msg-id 201109241209.12862.adrian.klaver@gmail.com
обсуждение исходный текст
Ответ на Re: pg_dump compress  (Roger Niederland <roger@niederland.com>)
Ответы Re: pg_dump compress
Список pgsql-general
On Saturday, September 24, 2011 7:16:11 am Roger Niederland wrote:
> On 9/23/2011 5:18 PM, Adrian Klaver wrote:
> > 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
>
> Just did not expect that the compression would be removed for plain files.
> In case anyone cares... 7-zip.org provides a 32 bit and 64 bit program
> which can utilize windows pipes.

Not sure why the compression was removed, there is no explanation in either the
commit or the release notes.  If you are interested, the commit that removed it
is:

http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;f=src/bin/pg_dump/pg_dump.c;h=7f508f1c6b515df66d27f860b2faa7b5761fa55d

You could submit a bug report and see where that leads:
http://www.postgresql.org/support/submitbug

> Probably others available, but this one works for me.




>
> Thanks,
> Roger

--
Adrian Klaver
adrian.klaver@gmail.com

В списке pgsql-general по дате отправления:

Предыдущее
От: Marti Raudsepp
Дата:
Сообщение: Re: pg_dump compress
Следующее
От: Raghavendra
Дата:
Сообщение: In which case PG_VERSION file updates ?