pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: pg_combinebackup: When reconstructing, avoid double slash in fil 2+ messages / 1 participants [nested] [flat]
* pgsql: pg_combinebackup: When reconstructing, avoid double slash in fil @ 2024-11-04 15:09 Robert Haas <rhaas@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Robert Haas @ 2024-11-04 15:09 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pg_combinebackup: When reconstructing, avoid double slash in filename. This function is always called with a relative_path that ends in a slash, so there's no need to insert a second one. So, don't. Instead, add an assertion to verify that nothing gets broken in the future, and adjust the comments. While this is not a critical bug, the duplicate slash is visible in error messages, which could create confusion, so back-patch to v17. This is also better in that it keeps the code consistent across branches. Patch by me, reviewed by Bertrand Drouvot and Amul Sul. Discussion: http://postgr.es/m/CA+TgmoaD7dBYPqe7kMtO0dyto7rd0rUh7joh=JPUSaFszKY6Pg@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/6c24801b1717ff68695647068a5ad8ff88f7639d Modified Files -------------- src/bin/pg_combinebackup/reconstruct.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: pg_combinebackup: When reconstructing, avoid double slash in fil @ 2024-11-04 15:09 Robert Haas <rhaas@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Robert Haas @ 2024-11-04 15:09 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pg_combinebackup: When reconstructing, avoid double slash in filename. This function is always called with a relative_path that ends in a slash, so there's no need to insert a second one. So, don't. Instead, add an assertion to verify that nothing gets broken in the future, and adjust the comments. While this is not a critical bug, the duplicate slash is visible in error messages, which could create confusion, so back-patch to v17. This is also better in that it keeps the code consistent across branches. Patch by me, reviewed by Bertrand Drouvot and Amul Sul. Discussion: http://postgr.es/m/CA+TgmoaD7dBYPqe7kMtO0dyto7rd0rUh7joh=JPUSaFszKY6Pg@mail.gmail.com Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/0d635b615d3fc406b0b3df0637831a799561fa77 Modified Files -------------- src/bin/pg_combinebackup/reconstruct.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-11-04 15:09 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-11-04 15:09 pgsql: pg_combinebackup: When reconstructing, avoid double slash in fil Robert Haas <rhaas@postgresql.org> 2024-11-04 15:09 pgsql: pg_combinebackup: When reconstructing, avoid double slash in fil Robert Haas <rhaas@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox