Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: advance lastReceiveLSN on keepalive messages
Fix a bug with V3PGReplicationStream where the server may never be able to send a CommandComplete message to the client because the client's status update messages do not advance the received LSN. This behavior can be reliably reproduced on a server where no data changes are happening, so the only messages being sent from the client are status updates and the only messages coming from the server are keepalives. The LSN reported from the server keepalives continues to advance, but the client reports a static lastReceiveLSN, so the server never considers the client caught up and never sends CommandComplete to trigger the client to shut down. By updating lastReceiveLSN on keepalive messages, the expected server CommandComplete and client Terminate messages are exchanged, allowing the server to gracefully shut down.
- Loading branch information