Skip to content

Commit ff61f80

Browse files
committed
Improve comment of create_recovery_conf()
1 parent 8dea09c commit ff61f80

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

restore.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,14 @@ create_recovery_conf(time_t backup_id,
691691
fprintf(fp, "recovery_target_xid = '%s'\n", target_xid);
692692
else if (backup_id != 0)
693693
{
694-
/* TODO Why does it depend on backup_id? */
694+
/*
695+
* We need to set this parameters only if 'backup_id' is provided
696+
* because the backup will be recovered as soon as possible as stop_lsn
697+
* is reached.
698+
* If 'backup_id' is not set we want to replay all available WAL records,
699+
* if 'recovery_target' is set all available WAL records will not be
700+
* replayed.
701+
*/
695702
fprintf(fp, "recovery_target = 'immediate'\n");
696703
fprintf(fp, "recovery_target_action = 'promote'\n");
697704
}

0 commit comments

Comments
 (0)