Re: [HACKERS] pg_dump -Fd and compression level

2015-07-28 Thread Andrew Dunstan
On 07/27/2015 03:52 AM, Marc Mamin wrote: 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->compressi

Re: [HACKERS] pg_dump -Fd and compression level

2015-07-27 Thread Marc Mamin
>>> >>> 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_D

Re: [HACKERS] pg_dump -Fd and compression level

2015-07-25 Thread Andrew Dunstan
On 07/25/2015 03:07 PM, Marc Mamin wrote: 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.

Re: [HACKERS] pg_dump -Fd and compression level

2015-07-25 Thread Marc Mamin
> >> >> 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 pat

Re: [HACKERS] pg_dump -Fd and compression level

2015-07-25 Thread Tom Lane
Andrew Dunstan writes: > On 07/25/2015 01:52 PM, I wrote: >> 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, thu

Re: [HACKERS] pg_dump -Fd and compression level

2015-07-25 Thread Andrew Dunstan
On 07/25/2015 01:52 PM, I wrote: 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.

Re: [HACKERS] pg_dump -Fd and compression level

2015-07-25 Thread Andrew Dunstan
On 07/25/2015 10:50 AM, Michael Paquier wrote: On Sat, Jul 25, 2015 at 11:09 PM, Marc Mamin wrote: On Sat, Jul 25, 2015 at 9:56 PM, Andrew Dunstan wrote: On 07/25/2015 03:20 AM, Andrew Dunstan wrote: On 07/25/2015 02:34 AM, Marc Mamin wrote: Andrew Dunstan writes: Hmm. Yeah. It looks

Re: [HACKERS] pg_dump -Fd and compression level

2015-07-25 Thread Marc Mamin
>On Sat, Jul 25, 2015 at 11:09 PM, Marc Mamin wrote: >> >>>On Sat, Jul 25, 2015 at 9:56 PM, Andrew Dunstan wrote: On 07/25/2015 03:20 AM, Andrew Dunstan wrote: > > > On 07/25/2015 02:34 AM, Marc Mamin wrote: >> >> >>> Andrew Dunstan writes: Hm

Re: [HACKERS] pg_dump -Fd and compression level

2015-07-25 Thread Michael Paquier
On Sat, Jul 25, 2015 at 11:09 PM, Marc Mamin wrote: > >>On Sat, Jul 25, 2015 at 9:56 PM, Andrew Dunstan wrote: >>> >>> On 07/25/2015 03:20 AM, Andrew Dunstan wrote: On 07/25/2015 02:34 AM, Marc Mamin wrote: > > >> Andrew Dunstan writes: >>> >>> Hmm. Yeah. It lo

Re: [HACKERS] pg_dump -Fd and compression level

2015-07-25 Thread Marc Mamin
>On Sat, Jul 25, 2015 at 9:56 PM, Andrew Dunstan wrote: >> >> On 07/25/2015 03:20 AM, Andrew Dunstan wrote: >>> >>> >>> On 07/25/2015 02:34 AM, Marc Mamin wrote: > Andrew Dunstan writes: >> >> Hmm. Yeah. It looks like commit >> a7ad5cf0cfcfab8418000d652fa4f0c6ad6c8911 >

Re: [HACKERS] pg_dump -Fd and compression level

2015-07-25 Thread Michael Paquier
On Sat, Jul 25, 2015 at 9:56 PM, Andrew Dunstan wrote: > > On 07/25/2015 03:20 AM, Andrew Dunstan wrote: >> >> >> On 07/25/2015 02:34 AM, Marc Mamin wrote: >>> >>> Andrew Dunstan writes: > > Hmm. Yeah. It looks like commit > a7ad5cf0cfcfab8418000d652fa4f0c6ad6c8911 > changed

Re: [HACKERS] pg_dump -Fd and compression level

2015-07-25 Thread Andrew Dunstan
On 07/25/2015 03:20 AM, Andrew Dunstan wrote: On 07/25/2015 02:34 AM, Marc Mamin wrote: Andrew Dunstan writes: Hmm. Yeah. It looks like commit a7ad5cf0cfcfab8418000d652fa4f0c6ad6c8911 changed from using the default compression for libz to using the compression set in pg_dump options, whic

Re: [HACKERS] pg_dump -Fd and compression level

2015-07-25 Thread Andrew Dunstan
On 07/25/2015 02:34 AM, Marc Mamin wrote: Andrew Dunstan writes: Hmm. Yeah. It looks like commit a7ad5cf0cfcfab8418000d652fa4f0c6ad6c8911 changed from using the default compression for libz to using the compression set in pg_dump options, which defaults to 0. This actually seems like the rig

Re: [HACKERS] pg_dump -Fd and compression level

2015-07-24 Thread Marc Mamin
>Andrew Dunstan writes: >> Hmm. Yeah. It looks like commit a7ad5cf0cfcfab8418000d652fa4f0c6ad6c8911 >> changed from using the default compression for libz to using the >> compression set in pg_dump options, which defaults to 0. This actually >> seems like the right thing to do, but it certainly

Re: [HACKERS] pg_dump -Fd and compression level

2015-07-24 Thread Tom Lane
Andrew Dunstan writes: > Hmm. Yeah. It looks like commit a7ad5cf0cfcfab8418000d652fa4f0c6ad6c8911 > changed from using the default compression for libz to using the > compression set in pg_dump options, which defaults to 0. This actually > seems like the right thing to do, but it certainly shou

Re: [HACKERS] pg_dump -Fd and compression level

2015-07-24 Thread Andrew Dunstan
On 07/24/2015 05:22 PM, Marc Mamin wrote: After our last upgrade, we've noticed a 10-20% size increase of our dump size. This comes from our backup scripts were pg_dump was called without setting -Z So it seems, that this fix did modify the default compression to use: http://michael.otacoo.com/

Re: [HACKERS] pg_dump -Fd and compression level

2015-07-24 Thread Marc Mamin
>> After our last upgrade, we've noticed a 10-20% size increase of our dump >> size. >> This comes from our backup scripts were pg_dump was called without setting -Z >> >> So it seems, that this fix did modify the default compression to use: >> http://michael.otacoo.com/postgresql-2/pg_dump-direc

Re: [HACKERS] pg_dump -Fd and compression level

2015-07-24 Thread Andrew Dunstan
On 07/24/2015 02:52 AM, Marc Mamin wrote: Hello, After our last upgrade, we've noticed a 10-20% size increase of our dump size. This comes from our backup scripts were pg_dump was called without setting -Z So it seems, that this fix did modify the default compression to use: http://michael.ota