Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c2410fc

Browse files
author
Artur Zakirov
committed
Fix WAL validate messages
1 parent 8fdbe1e commit c2410fc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

parsexlog.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,12 @@ validate_wal(pgBackup *backup,
164164
all_wal = true;
165165
break;
166166
}
167-
/* Stop if there are no target xid and target time */
167+
/* If there are no target xid and target time */
168168
else if (!TransactionIdIsValid(target_xid) && target_time == 0 &&
169169
xlogreader->ReadRecPtr == backup->stop_lsn)
170170
{
171171
all_wal = true;
172-
break;
172+
/* We don't stop here. We want to get last_xid and last_time */
173173
}
174174

175175
startpoint = InvalidXLogRecPtr; /* continue reading at next record */
@@ -217,13 +217,13 @@ validate_wal(pgBackup *backup,
217217
last_timestamp, last_xid);
218218

219219
if (TransactionIdIsValid(target_xid) && target_time != 0)
220-
elog(ERROR, "there are not WAL records to time %s and xid " XID_FMT,
220+
elog(ERROR, "there are no WAL records to time %s and xid " XID_FMT,
221221
target_timestamp, target_xid);
222222
else if (TransactionIdIsValid(target_xid))
223-
elog(ERROR, "there are not WAL records to xid " XID_FMT,
223+
elog(ERROR, "there are no WAL records to xid " XID_FMT,
224224
target_xid);
225225
else if (target_time != 0)
226-
elog(ERROR, "there are not WAL records to time %s ",
226+
elog(ERROR, "there are no WAL records to time %s ",
227227
target_timestamp);
228228
}
229229
}

0 commit comments

Comments
 (0)