Re: pg_basebackup for streaming base backups - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: pg_basebackup for streaming base backups
Date
Msg-id 1295361604-sup-2975@alvh.no-ip.org
Whole thread Raw
In response to Re: pg_basebackup for streaming base backups  (Magnus Hagander <magnus@hagander.net>)
Responses Re: pg_basebackup for streaming base backups
List pgsql-hackers
Excerpts from Magnus Hagander's message of mar ene 18 10:47:03 -0300 2011:

> Ok, thanks for clarifying. I've updated to use strerror(). Guess it's
> time for another patch, PFA :-)

Thanks ...  Message nitpick:
+   if (compresslevel > 0)
+   {
+       fprintf(stderr,
+               _("%s: this build does not support compression\n"),
+               progname);
+       exit(1);
+   }

pg_dump uses the following wording:

"WARNING: archive is compressed, but this installation does not support "
"compression -- no data will be available\n"

So perhaps yours should s/build/installation/


Also, in messages of this kind,
+               if (gzsetparams(ztarfile, compresslevel, Z_DEFAULT_STRATEGY) != Z_OK)
+               {
+                   fprintf(stderr, _("%s: could not set compression level %i\n"),
+                           progname, compresslevel);

Shouldn't you also be emitting the gzerror()? ... oh I see you're
already doing it for most gz calls.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: pg_filedump moved to pgfoundry
Next
From: Magnus Hagander
Date:
Subject: Re: pg_basebackup for streaming base backups