We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a53c4c1 commit 0a87d49Copy full SHA for 0a87d49
src/delete.c
@@ -207,8 +207,8 @@ do_retention_purge(void)
207
}
208
209
/*
210
- * If oldest_lsn wasn`t set in prevous step
211
- * 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
212
*/
213
if (delete_wal && (XLogRecPtrIsInvalid(oldest_lsn)))
214
{
@@ -217,6 +217,11 @@ do_retention_purge(void)
217
oldest_tli = backup->tli;
218
219
220
+ /* Be paranoid */
221
+ if (XLogRecPtrIsInvalid(oldest_lsn))
222
+ elog(ERROR, "Not going to purge WAL because backup %s has invalid LSN",
223
+ base36enc(backup->start_time));
224
+
225
/* Purge WAL files */
226
if (delete_wal)
227
0 commit comments