Re: basebackup.c's sendFile() ignores read errors

Поиск
Список
Период
Сортировка
От Jeevan Chalke
Тема Re: basebackup.c's sendFile() ignores read errors
Дата
Msg-id CAM2+6=UafA__zVDuXa7iQ6SWhPo44_5iL=LPWNR-S=gNYx7fLQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: basebackup.c's sendFile() ignores read errors  (Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>)
Ответы Re: basebackup.c's sendFile() ignores read errors  (Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>)
Список pgsql-hackers


On Thu, Aug 29, 2019 at 3:17 PM Jeevan Ladhe <jeevan.ladhe@enterprisedb.com> wrote:
Hi Jeevan

I had a look at the patch and this seems correct to me.

Thanks, Jeevan Ladhe.
 

Few minor comments:

+ /* Check fread() error. */
+ CHECK_FREAD_ERROR(fp, pathbuf);
+

The comments above the macro call at both the places are not necessary as
your macro name itself is self-explanatory.

----------
+ /*
+ * If file is truncated, then we will hit
+ * end-of-file error in which case we don't
+ * want to error out, instead just pad it with
+ * zeros.
+ */
+ if (feof(fp))

The if block does not do the truncation right away, so I think the comment
above can be reworded to explain why we reset cnt?

Fixed both comments in the attached patch.
 
--
Jeevan Chalke
Technical Architect, Product Development
EnterpriseDB Corporation
The Enterprise PostgreSQL Company

Вложения

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

Предыдущее
От: Kuntal Ghosh
Дата:
Сообщение: Re: POC: Cleaning up orphaned files using undo logs
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: [HACKERS] CLUSTER command progress monitor