Re: [HACKERS] PATCH: pg_basebackup (missing exit on error)

2012-03-28 Thread Robert Haas
On Tue, Mar 27, 2012 at 7:13 AM, Fujii Masao masao.fu...@gmail.com wrote: Attached patch removes the fflush() part, changes the log message and removes the check of tarfile, as above. With this patch applied, we end up with: if (strcmp(basedir, -) == 0) { #ifdef

Re: [HACKERS] PATCH: pg_basebackup (missing exit on error)

2012-03-28 Thread Fujii Masao
On Wed, Mar 28, 2012 at 9:40 PM, Robert Haas robertmh...@gmail.com wrote: I think it would make sense to rearrange that so that we don't have two tests for ztarfile != NULL; do that test first, and then if it fails, do the strcmp after that. Makes sense. Also, if we're going to test the

Re: [HACKERS] PATCH: pg_basebackup (missing exit on error)

2012-03-27 Thread Fujii Masao
On Thu, Jan 26, 2012 at 11:48 PM, Robert Haas robertmh...@gmail.com wrote: On Tue, Jan 24, 2012 at 4:39 AM, Thomas Ogrisegg tom-...@patches.fnord.at wrote: While testing a backup script, I noticed that pg_basebackup exits with 0, even if it had errors while writing the backup to disk when the

Re: [HACKERS] PATCH: pg_basebackup (missing exit on error)

2012-01-26 Thread Robert Haas
On Tue, Jan 24, 2012 at 4:39 AM, Thomas Ogrisegg tom-...@patches.fnord.at wrote: While testing a backup script, I noticed that pg_basebackup exits with 0, even if it had errors while writing the backup to disk when the backup file is to be sent to stdout. The attached patch should fix this

[HACKERS] PATCH: pg_basebackup (missing exit on error)

2012-01-25 Thread Thomas Ogrisegg
While testing a backup script, I noticed that pg_basebackup exits with 0, even if it had errors while writing the backup to disk when the backup file is to be sent to stdout. The attached patch should fix this problem (and some special cases when the last write fails). Regards, Thomas diff -uNr