Re: improving basebackup.c's file-reading code

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Hamid Akhtar <hamid(dot)akhtar(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: improving basebackup.c's file-reading code
Date: 2020-06-17 15:45:17
Message-ID: CA+TgmoYLV7Dm7Yr6yXRF09kW1SK3AJEYTFkgj2qwZCJduyn5WA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 29, 2020 at 5:52 AM Hamid Akhtar <hamid(dot)akhtar(at)gmail(dot)com> wrote:
> The idea and the patch looks good to me.
>
> It makes sense to change fread to basebackup_read_file which internally calls pg_pread which is a portable function as opposed to read. As you've mentioned, this is much better for error handling.

Thanks for the review. I have now committed the patch, after rebasing
and adjusting one comment slightly.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2020-06-17 16:07:22 Re: [Patch] ALTER SYSTEM READ ONLY
Previous Message Jehan-Guillaume de Rorthais 2020-06-17 15:44:51 [patch] demote