From: | Hamid Akhtar <hamid(dot)akhtar(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: improving basebackup.c's file-reading code |
Date: | 2020-04-29 09:51:09 |
Message-ID: | 158815386912.780.17053485990951720407.pgcf@coridan.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | Postg토토 커뮤니티SQL |
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 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.
I guess it is more of a personal choice, but I would suggest making the while conditions consistent as well. The while loop in the patch @ line 121 conditions over return value of "basebackup_read_file" whereas @ line 177, it has a condition "(len < statbuf->st_size)".
The new status of this patch is: Ready for Committer
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2020-04-29 11:22:43 | Re: Proposing WITH ITERATIVE |
Previous Message | Dilip Kumar | 2020-04-29 09:49:15 | Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions |