agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix handling of copy_file_range() return value
Date: Mon, 29 Jun 2026 11:09:34 +0000
Message-ID: <E1we9rq-000dxd-0z@gemulon.postgresql.org> (raw)
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(+)
view thread (3+ messages) latest in thread
Message-ID: <E1we9rq-000dxd-0z@gemulon.postgresql.org>
Permalink: ../E1we9rq-000dxd-0z@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1we9rq-000dxd-0z@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix handling of copy_file_range() return value
In-Reply-To: <E1we9rq-000dxd-0z@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox