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:
parent
a53c4c181d
commit
0a87d49840
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user