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

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

From: "Shigehiro honda" <fwif0083(at)mb(dot)infoweb(dot)ne(dot)jp>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6060: does not work -z option of pg_basebackup
Date: 2011-06-15 12:47:07
Message-ID: 201106151247.p5FCl70O029002@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      6060
Logged by:          Shigehiro honda
Email address:      fwif0083(at)mb(dot)infoweb(dot)ne(dot)jp
PostgreSQL version: 9.1 beta2
Operating system:   Linux
Description:        does not work -z option of pg_basebackup
Details: 

it seems that the -z option of pg_basebackup does not work correctly. 
In getopt_long() function, there is not 'z' in 3rd argument.

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.

$ diff pg_basebackup.c.DIST pg_basebackup.c
267c267
< 			if (compresslevel > 0)
---
> 			if (compresslevel > 0 || compresslevel == Z_DEFAULT_COMPRESSION )
284c284
< 			if (compresslevel > 0)
---
> 			if (compresslevel > 0 || compresslevel == Z_DEFAULT_COMPRESSION)
308c308
< 		if (compresslevel > 0)
---
> 		if (compresslevel > 0 || compresslevel == Z_DEFAULT_COMPRESSION)
328c328
< 	if (compresslevel > 0)
---
> 	if (compresslevel > 0 || compresslevel == Z_DEFAULT_COMPRESSION)
979c979
< 	while ((c = getopt_long(argc, argv, "D:F:l:Z:c:h:p:U:xwWvP",
---
> 	while ((c = getopt_long(argc, argv, "D:F:l:Z:c:h:p:U:zxwWvP",
1092c1092
< 	if (format == 'p' && compresslevel > 0)
---
> 	if (format == 'p' && ( compresslevel > 0|| compresslevel ==
Z_DEFAULT_COMPRESSION ))

regards,

Responses

pgsql-bugs by date

Next:From: YannDate: 2011-06-15 13:00:40
Subject: BUG #6061: Progresql.exe memory usage using HOLD cursor.
Previous:From: Joel JacobsonDate: 2011-06-15 07:03:58
Subject: psql \s not working - OS X

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