1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-30 05:39:12 +02:00

More efficient generation of diff/incr backup label.

This commit is contained in:
David Steele 2021-10-07 14:58:11 -04:00
parent 498902e885
commit 74d3131830

View File

@ -47,11 +47,8 @@ backupLabelFormat(BackupType type, const String *backupLabelPrior, time_t timest
// Else diff or incr label // Else diff or incr label
else else
{ {
// Get the full backup portion of the prior backup label // Get the full backup portion of the prior backup label and append the diff/incr timestamp
result = strSubN(backupLabelPrior, 0, 16); result = strNewFmt("%.16s_%s%s", strZ(backupLabelPrior), buffer, type == backupTypeDiff ? "D" : "I");
// Append the diff/incr timestamp
strCatFmt(result, "_%s%s", buffer, type == backupTypeDiff ? "D" : "I");
} }
FUNCTION_LOG_RETURN(STRING, result); FUNCTION_LOG_RETURN(STRING, result);