Skip to content

Commit 30fbea7

Browse files
committed
bugfix: "note" and "expire-time" backup metainformation fields must be preserved during merge
1 parent 1e2491e commit 30fbea7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/merge.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,15 @@ merge_chain(parray *parent_chain, pgBackup *full_backup, pgBackup *dest_backup)
702702
full_backup->compress_alg = dest_backup->compress_alg;
703703
full_backup->compress_level = dest_backup->compress_level;
704704

705+
/* If incremental backup is pinned,
706+
* then result FULL backup must also be pinned.
707+
*/
708+
if (dest_backup->expire_time)
709+
full_backup->expire_time = dest_backup->expire_time;
710+
711+
if (dest_backup->note)
712+
full_backup->note = pgut_strdup(dest_backup->note);
713+
705714
/* FULL backup must inherit wal mode. */
706715
full_backup->stream = dest_backup->stream;
707716

0 commit comments

Comments
 (0)