Use GetRedoStartLsn() instead of walproposer epoch start LSN for on-demand WAL download

This commit is contained in:
Konstantin Knizhnik
2024-10-03 18:27:28 +03:00
parent 6a9e2d657c
commit 45d3660630
+1 -7
View File
@@ -191,13 +191,7 @@ NeonOnDemandXLogReaderRoutines(XLogReaderRoutine *xlr)
if (!wal_reader)
{
XLogRecPtr epochStartLsn = pg_atomic_read_u64(&GetWalpropShmemState()->propEpochStartLsn);
if (epochStartLsn == 0)
{
elog(ERROR, "Unable to start walsender when propEpochStartLsn is 0!");
}
wal_reader = NeonWALReaderAllocate(wal_segment_size, epochStartLsn, "[walsender] ");
wal_reader = NeonWALReaderAllocate(wal_segment_size, GetRedoStartLsn(), "[walsender] ");
}
xlr->page_read = NeonWALPageRead;
xlr->segment_open = NeonWALReadSegmentOpen;