1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-02-03 14:01:57 +02:00

minor fix to do_retention_purge

This commit is contained in:
Grigory Smolkin 2018-01-24 04:50:32 +03:00
parent a53c4c181d
commit 0a87d49840

View File

@ -207,8 +207,8 @@ do_retention_purge(void)
}
/*
* If oldest_lsn wasn`t set in prevous step
* get oldest backup LSN and TLI for WAL purging
* If oldest_lsn and oldest_tli weren`t set because previous step was skipped
* then set them now if we are going to purge WAL
*/
if (delete_wal && (XLogRecPtrIsInvalid(oldest_lsn)))
{
@ -217,6 +217,11 @@ do_retention_purge(void)
oldest_tli = backup->tli;
}
/* Be paranoid */
if (XLogRecPtrIsInvalid(oldest_lsn))
elog(ERROR, "Not going to purge WAL because backup %s has invalid LSN",
base36enc(backup->start_time));
/* Purge WAL files */
if (delete_wal)
{