Re: PATCH: pg_basebackup (missing exit on error)

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: PATCH: pg_basebackup (missing exit on error)
Дата
Msg-id CA+TgmoaycwtMwyRSMUHm=_LzELDVV2z-as910fRufj9fbvicZg@mail.gmail.com
обсуждение исходный текст
Ответ на PATCH: pg_basebackup (missing exit on error)  (Thomas Ogrisegg <tom-nic@patches.fnord.at>)
Ответы Re: PATCH: pg_basebackup (missing exit on error)  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
On Tue, Jan 24, 2012 at 4:39 AM, Thomas Ogrisegg
<tom-nic@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
> problem (and some special cases when the last write fails).

This part looks like a typo:

+                                       if (fflush (tarfile) != 0)
+                                       {
+                                               fprintf(stderr, _("%s:
error flushing stdout: %s\n"),
+
strerror (errno));
+                                               disconnect_and_exit(1);
+                                       }

The error is in flushing the tarfile, not stdout, right?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [v9.2] sepgsql's DROP Permission checks
Следующее
От: Josh Kupershmidt
Дата:
Сообщение: Re: Psql names completion.