File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 39
39
#include "lib/stringinfo.h"
40
40
#include "replication/slot.h"
41
41
#include "replication/message.h"
42
+ #include "access/xlog_internal.h"
42
43
#include "utils/builtins.h"
43
44
#include "utils/memutils.h"
44
45
@@ -456,6 +457,20 @@ RecoveryFilterLoad(int filter_node_id, Syncpoint *spvector)
456
457
errmsg ("out of memory" ),
457
458
errdetail ("Failed while allocating a WAL reading processor." )));
458
459
460
+ /*
461
+ * The given start_lsn pointer points to the end of the syncpoint record,
462
+ * which is not necessarily the beginning of the next record, if the
463
+ * previous record happens to end at a page boundary. Skip over the page
464
+ * header in that case to find the next record.
465
+ */
466
+ if (start_lsn % XLOG_BLCKSZ == 0 )
467
+ {
468
+ if (XLogSegmentOffset (start_lsn , wal_segment_size ) == 0 )
469
+ start_lsn += SizeOfXLogLongPHD ;
470
+ else
471
+ start_lsn += SizeOfXLogShortPHD ;
472
+ }
473
+
459
474
/* fill our filter */
460
475
do
461
476
{
You can’t perform that action at this time.
0 commit comments