Skip to content

Commit ae4e640

Browse files
committed
minor fix
1 parent 6e2a1a7 commit ae4e640

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: src/show.c

+3-4
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ show_instance(const char *instance_name, time_t requested_backup_id, bool show_n
294294
static void
295295
print_backup_json_object(PQExpBuffer buf, pgBackup *backup)
296296
{
297-
TimeLineID parent_tli;
297+
TimeLineID parent_tli = 0;
298298
char timestamp[100] = "----";
299299
char lsn[20];
300300

@@ -344,10 +344,9 @@ print_backup_json_object(PQExpBuffer buf, pgBackup *backup)
344344
json_add_key(buf, "parent-tli", json_level);
345345

346346
/* Only incremental backup can have Parent TLI */
347-
if (backup->backup_mode == BACKUP_MODE_FULL)
348-
parent_tli = 0;
349-
else if (backup->parent_backup_link)
347+
if (backup->parent_backup_link)
350348
parent_tli = backup->parent_backup_link->tli;
349+
351350
appendPQExpBuffer(buf, "%u", parent_tli);
352351

353352
snprintf(lsn, lengthof(lsn), "%X/%X",

0 commit comments

Comments
 (0)