agora inbox for pgsql-committers@postgresql.orghelp / color / mirror / Atom feed
pgsql: Fix handling of copy_file_range() return value 3+ messages / 1 participants [nested] [flat]
* pgsql: Fix handling of copy_file_range() return value @ 2026-06-29 11:09 Peter Eisentraut <peter@eisentraut.org> 0 siblings, 0 replies; 3+ messages in thread From: Peter Eisentraut @ 2026-06-29 11:09 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix handling of copy_file_range() return value Treat copy_file_range() return value of zero as an error: it indicates that no bytes could be copied (perhaps the source file is shorter than expected), and the existing retry loop would otherwise spin forever since nwritten would never reach BLCKSZ. The other uses of copy_file_range() in the tree don't have this problem. Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com> Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Reviewed-by: Yingying Chen <cyy9255@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/3208cf7a-c7f3-41eb-92f6-33cbeff4df40%40eisentraut.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/994f770a0fd55dfdeb96d1d60d35545ba2d51480 Modified Files -------------- src/bin/pg_combinebackup/reconstruct.c | 3 +++ 1 file changed, 3 insertions(+) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix handling of copy_file_range() return value @ 2026-06-29 11:09 Peter Eisentraut <peter@eisentraut.org> 0 siblings, 0 replies; 3+ messages in thread From: Peter Eisentraut @ 2026-06-29 11:09 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix handling of copy_file_range() return value Treat copy_file_range() return value of zero as an error: it indicates that no bytes could be copied (perhaps the source file is shorter than expected), and the existing retry loop would otherwise spin forever since nwritten would never reach BLCKSZ. The other uses of copy_file_range() in the tree don't have this problem. Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com> Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Reviewed-by: Yingying Chen <cyy9255@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/3208cf7a-c7f3-41eb-92f6-33cbeff4df40%40eisentraut.org Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d36b728949bf4e37ada1cd23e0f2aaa94f609a70 Modified Files -------------- src/bin/pg_combinebackup/reconstruct.c | 3 +++ 1 file changed, 3 insertions(+) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix handling of copy_file_range() return value @ 2026-06-29 11:09 Peter Eisentraut <peter@eisentraut.org> 0 siblings, 0 replies; 3+ messages in thread From: Peter Eisentraut @ 2026-06-29 11:09 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix handling of copy_file_range() return value Treat copy_file_range() return value of zero as an error: it indicates that no bytes could be copied (perhaps the source file is shorter than expected), and the existing retry loop would otherwise spin forever since nwritten would never reach BLCKSZ. The other uses of copy_file_range() in the tree don't have this problem. Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com> Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Reviewed-by: Yingying Chen <cyy9255@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/3208cf7a-c7f3-41eb-92f6-33cbeff4df40%40eisentraut.org Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/090ce6934c3442e0048192e545c05bf1c6f8d92a Modified Files -------------- src/bin/pg_combinebackup/reconstruct.c | 3 +++ 1 file changed, 3 insertions(+) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2026-06-29 11:09 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-06-29 11:09 pgsql: Fix handling of copy_file_range() return value Peter Eisentraut <peter@eisentraut.org> 2026-06-29 11:09 pgsql: Fix handling of copy_file_range() return value Peter Eisentraut <peter@eisentraut.org> 2026-06-29 11:09 pgsql: Fix handling of copy_file_range() return value Peter Eisentraut <peter@eisentraut.org>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox