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

2020-06-25 Thread Robert Haas
On Thu, Jun 25, 2020 at 10:29 AM Daniel Gustafsson wrote: > As this went in, can we close the 2020-07 CF entry or is there anything left > in > the patchseries? Done. Thanks for the reminder. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

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

2020-06-25 Thread Daniel Gustafsson
> On 17 Jun 2020, at 17:45, Robert Haas wrote: > > On Wed, Apr 29, 2020 at 5:52 AM Hamid Akhtar 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.

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

2020-06-17 Thread Robert Haas
On Wed, Apr 29, 2020 at 5:52 AM Hamid Akhtar 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

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

2020-04-29 Thread Hamid Akhtar
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:tested, passed The idea and the patch looks good to me. It makes sense to

improving basebackup.c's file-reading code

2020-04-27 Thread Robert Haas
Hi, basebackup.c's code to read from files uses fread() and friends. This is not great, because it's not documented to set errno. See commit 286af0ce12117bc673b97df6228d1a666594d247 and related discussion. It seems like a better idea would be to use pg_pgread(), which not only does set errno, but