Skip to content

Commit

Permalink
Handle keepalives while receiving WAL in recovery.
Browse files Browse the repository at this point in the history
Since c310932 safekeeper sometimes sends it.

ref #843
  • Loading branch information
arssher authored and lubennikovaav committed Feb 9, 2022
1 parent bcbf12c commit a3e992f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/backend/replication/walproposer.c
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,9 @@ WalProposerRecovery(int donor, TimeLineID timeline, XLogRecPtr startpos, XLogRec
}
else
{
Assert(buf[0] == 'w');
Assert(buf[0] == 'w' || buf[0] == 'k');
if (buf[0] == 'k')
continue; /* keepalive */
memcpy(&rec_start_lsn, &buf[XLOG_HDR_START_POS],
sizeof rec_start_lsn);
rec_start_lsn = pg_ntoh64(rec_start_lsn);
Expand Down

0 comments on commit a3e992f

Please sign in to comment.