diff --git a/src/dir.c b/src/dir.c index 7a7ff169..bcf6293e 100644 --- a/src/dir.c +++ b/src/dir.c @@ -80,6 +80,8 @@ static char *pgdata_exclude_files[] = "postmaster.pid", "postmaster.opts", "probackup_recovery.conf", + "recovery.signal", + "standby.signal", NULL }; diff --git a/src/restore.c b/src/restore.c index 8a8ee7d6..f25bdb98 100644 --- a/src/restore.c +++ b/src/restore.c @@ -967,6 +967,17 @@ create_recovery_conf(time_t backup_id, if (rt->target_tli) fio_fprintf(fp, "recovery_target_timeline = '%u'\n", rt->target_tli); + else + { + /* + * In PG12 default recovery target timeline was changed to 'latest', which + * is extremely risky. Explicitly preserve old behavior of recovering to current + * timneline for PG12. + */ +#if PG_VERSION_NUM >= 120000 + fio_fprintf(fp, "recovery_target_timeline = '%u'\n", backup->tli); +#endif + } if (rt->target_action) fio_fprintf(fp, "recovery_target_action = '%s'\n", rt->target_action);