Skip site navigation (1) Skip section navigation (2)

Re: BUG #6060: does not work -z option of pg_basebackup

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Shigehiro honda" <fwif0083(at)mb(dot)infoweb(dot)ne(dot)jp>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6060: does not work -z option of pg_basebackup
Date: 2011-06-15 16:21:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
"Shigehiro honda" <fwif0083(at)mb(dot)infoweb(dot)ne(dot)jp> writes:
> it seems that the -z option of pg_basebackup does not work correctly. 
> In getopt_long() function, there is not 'z' in 3rd argument.

Ooops.  Doesn't look like this got tested much (or at all).

> And Z_DEFAULT_COMPRESSION are defined as (-1) in my zlib.h and it does only
> test (compresslevel > 0) in the code, so the command does not compress
> anyway.

I think it would be sufficient to test (compresslevel != 0) in all these
places, instead of hard-wiring knowledge of Z_DEFAULT_COMPRESSION.

Will fix, thanks for the report!

> $ diff pg_basebackup.c.DIST pg_basebackup.c

BTW, plain diffs are just about useless, since patch can't apply them
safely if the code has changed at all.  Please send -c or -u format
diffs in future.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2011-06-15 16:43:21
Subject: Re: BUG #6061: Progresql.exe memory usage using HOLD cursor.
Previous:From: Tom LaneDate: 2011-06-15 15:16:35
Subject: Re: [GENERAL] psql \s not working - OS X

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group