Re: pg_dump -Fd and compression level - Mailing list pgsql-hackers

From Marc Mamin
Subject Re: pg_dump -Fd and compression level
Date
Msg-id B6F6FD62F2624C4C9916AC0175D56D8828C1827B@jenmbs01.ad.intershop.net
Whole thread Raw
In response to Re: pg_dump -Fd and compression level  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: pg_dump -Fd and compression level
List pgsql-hackers
>
>>
>> I propose to tighten pg_dump's rules so that only 0..9 are accepted as
>> arguments for -Z, and in compress_io.c:cfopen(), if compression is
>> equal to Z_DEFAULT_COMPRESSION, not add any explicit compression value
>> to the mode, thus using the zlib default.
>>
>>
>
>
>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
compressionbecause reading the files back is not 220          * possible since gzdopen uses buffered IO which totally
screwsfile 221          * positioning. 222          */ 223         if (AH->compression != 0) 224
exit_horribly(modulename,225                      "compression is not supported by tar archive format\n"); 226     }
regards,Marc  > >cheers > >andrew 



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump -Fd and compression level
Next
From: Pavel Stehule
Date:
Subject: Re: polymorphic types - enforce casting to most common type automatically