Re: pg_dump -Fd and compression level

Поиск
Список
Период
Сортировка
От Marc Mamin
Тема Re: pg_dump -Fd and compression level
Дата
Msg-id B6F6FD62F2624C4C9916AC0175D56D8828C1869D@jenmbs01.ad.intershop.net
обсуждение исходный текст
Ответ на Re: pg_dump -Fd and compression level  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: pg_dump -Fd and compression level  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
>>>
>>> As per attached patch.
>>>
>>> Comments?
>>
>> It seems that the first test on the compression in pg_backup_tar.c is now obsolete.
>> It didn't make much sense anyway.
>>
>>
>>
>>    211         if (AH->compression < 0 || AH->compression > 9)
>>    212             AH->compression = Z_DEFAULT_COMPRESSION;
>>    213
>>    214         /* Don't compress into tar files unless asked to do so */
>>    215         if (AH->compression == Z_DEFAULT_COMPRESSION)
>>    216             AH->compression = 0;
>>    217
>>    218         /*
>>    219          * We don't support compression because reading the files back is not
>>    220          * possible since gzdopen uses buffered IO which totally screws file
>>    221          * positioning.
>>    222          */
>>    223         if (AH->compression != 0)
>>    224             exit_horribly(modulename,
>>    225                      "compression is not supported by tar archive format\n");
>>    226     }
>>
>>
>
>In fact, the first two tests look unnecessary. Neither condition should
>be possible now.
>

Hello,

Isn't the second test still required if you call pg_dump -Ft without setting -Z0 explicitly ?
(=> AH->compression == Z_DEFAULT_COMPRESSION)

There still are a few suspicious places in pg_backup_tar.c
that refer to the compression although not supported (except for blob ?)
(C programming is beyond my capabilities, I can roughly read simple code ... )

regards,
Marc Mamin




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

Предыдущее
От: Etsuro Fujita
Дата:
Сообщение: Re: We need to support ForeignRecheck for late row locking, don't we?
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Sharing aggregate states between different aggregate functions