pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_combinebackup: When reconstructing, avoid double slash in fil
Date: Mon, 04 Nov 2024 15:09:36 +0000
Message-ID: <E1t7yi0-0009Uv-AV@gemulon.postgresql.org> (raw)

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(-)



view thread (2+ messages)

Message-ID: <E1t7yi0-0009Uv-AV@gemulon.postgresql.org>
Permalink:  ../E1t7yi0-0009Uv-AV@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1t7yi0-0009Uv-AV@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: rhaas@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: pg_combinebackup: When reconstructing, avoid double slash in fil
  In-Reply-To: <E1t7yi0-0009Uv-AV@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox