mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-02-02 13:36:08 +02:00
[Issue #134] do not backup "recovery.signal" and "standby.signal" files, and for PG12 and newer always set recovery_target_timeline to current
This commit is contained in:
parent
19ad13d777
commit
ff40fcc4be
@ -80,6 +80,8 @@ static char *pgdata_exclude_files[] =
|
||||
"postmaster.pid",
|
||||
"postmaster.opts",
|
||||
"probackup_recovery.conf",
|
||||
"recovery.signal",
|
||||
"standby.signal",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user