pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shigehiro honda <fwif0083@mb.infoweb.ne.jp>
To: pgsql-bugs@postgresql.org
Subject: BUG #6060: does not work -z option of pg_basebackup
Date: Wed, 15 Jun 2011 12:47:07 GMT
Message-ID: <201106151247.p5FCl70O029002@wwwmaster.postgresql.org> (raw)


The following bug has been logged online:

Bug reference:      6060
Logged by:          Shigehiro honda
Email address:      fwif0083@mb.infoweb.ne.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,



view thread (2+ messages)  latest in thread

Message-ID: <201106151247.p5FCl70O029002@wwwmaster.postgresql.org>
Permalink:  ../201106151247.p5FCl70O029002@wwwmaster.postgresql.org/
Also on:    postgresql.org/message-id/201106151247.p5FCl70O029002@wwwmaster.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: fwif0083@mb.infoweb.ne.jp
  Subject: Re: BUG #6060: does not work -z option of pg_basebackup
  In-Reply-To: <201106151247.p5FCl70O029002@wwwmaster.postgresql.org>
  References: <201106151247.p5FCl70O029002@wwwmaster.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox