1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-03-03 14:52:21 +02:00

Fix manifest command filter for files in a tablespace.

pg_data/ was appended at the beginning of the filter, which meant that files in tablespaces could never be queried directly.

Update the filter to require the full path, including pg_data/ or pg_tblspc/.
This commit is contained in:
David Steele 2023-09-17 17:06:42 -04:00
parent ed88f0483e
commit d27533b40f
2 changed files with 4 additions and 4 deletions

View File

@ -501,7 +501,7 @@ cmdManifestRender(void)
// Single file
if (filter != NULL)
{
const ManifestFile file = manifestFileFind(manifest, strNewFmt(MANIFEST_TARGET_PGDATA "/%s", strZ(filter)));
const ManifestFile file = manifestFileFind(manifest, filter);
strCat(result, cmdManifestFileRender(manifest, &file, true, json));
}

View File

@ -164,7 +164,7 @@ testRun(void)
TEST_TITLE("single file block map from full");
StringList *argList = strLstDup(argListCommon);
hrnCfgArgRawZ(argList, cfgOptFilter, PG_PATH_BASE "/1/2");
hrnCfgArgRawZ(argList, cfgOptFilter, MANIFEST_TARGET_PGDATA "/" PG_PATH_BASE "/1/2");
hrnCfgArgRawZ(argList, cfgOptSet, "20191002-070640F");
HRN_CFG_LOAD(cfgCmdManifest, argList);
@ -459,7 +459,7 @@ testRun(void)
TEST_TITLE("single file block map from diff");
argList = strLstDup(argListCommon);
hrnCfgArgRawZ(argList, cfgOptFilter, PG_PATH_BASE "/1/2");
hrnCfgArgRawZ(argList, cfgOptFilter, MANIFEST_TARGET_PGDATA "/" PG_PATH_BASE "/1/2");
HRN_CFG_LOAD(cfgCmdManifest, argList);
TEST_RESULT_STR_Z(
@ -487,7 +487,7 @@ testRun(void)
TEST_TITLE("single file block map delta from diff");
argList = strLstDup(argListCommon);
hrnCfgArgRawZ(argList, cfgOptFilter, PG_PATH_BASE "/1/2");
hrnCfgArgRawZ(argList, cfgOptFilter, MANIFEST_TARGET_PGDATA "/" PG_PATH_BASE "/1/2");
hrnCfgArgRawZ(argList, cfgOptRepo, "2");
hrnCfgArgRawZ(argList, cfgOptPg, "1");
HRN_CFG_LOAD(cfgCmdManifest, argList);