Re: BUG #12779: pg_dump -Fd doesn't care about -Z

Поиск
Список
Период
Сортировка
От Christoph Berg
Тема Re: BUG #12779: pg_dump -Fd doesn't care about -Z
Дата
Msg-id 20150218091712.GA26116@msg.credativ.de
обсуждение исходный текст
Ответ на Re: BUG #12779: pg_dump -Fd doesn't care about -Z  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-bugs
Re: Michael Paquier 2015-02-18 <CAB7nPqTLSv5qES=9hODzkX62V5XcivP1ij=_iahR_-SriD2AOA@mail.gmail.com>
> On Wed, Feb 18, 2015 at 3:52 AM, Tom Lane wrote:
> > This doesn't look tremendously hard to fix, but it's not a one-liner
> > either.  Don't have time for it personally right now.
>
> Interesting. The call to gzopen is missing the compression level,
> always passing either 'w' or 'wb', while for example to write with a
> compression level of 6 we should pass w6 or wb6.
>
> The patch attached addresses that.

The patch works for me:

$ paste <(du ?.fd) <(du ?.fd.patched)
5392    0.fd    5392    0.fd.patched
1164    1.fd    1492    1.fd.patched
1164    2.fd    1448    2.fd.patched
1164    3.fd    1400    3.fd.patched
1164    4.fd    1244    4.fd.patched
1164    5.fd    1156    5.fd.patched
1164    6.fd    1164    6.fd.patched
1164    7.fd    1164    7.fd.patched
1164    8.fd    1164    8.fd.patched
1164    9.fd    1164    9.fd.patched

(I guess the next step would be to support other compressors, xz
yields a 860kB backup on this trivial test data...)

Mit freundlichen Grüßen,
Christoph Berg
--
Senior Berater, Tel.: +49 (0)21 61 / 46 43-187
credativ GmbH, HRB Mönchengladbach 12080, USt-ID-Nummer: DE204566209
Hohenzollernstr. 133, 41061 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer
pgp fingerprint: 5C48 FE61 57F4 9179 5970  87C6 4C5A 6BAB 12D2 A7AE

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #12779: pg_dump -Fd doesn't care about -Z
Следующее
От: patl659in@rediffmail.com
Дата:
Сообщение: BUG #12782: Some abnormal observation about the to_date() function in greenplum database