replicase / pgcapture

A scalable Netflix DBLog implementation for PostgreSQL
Apache License 2.0
220 stars 31 forks source link

feat: add replyRequested when report LSN when needed #62

Closed benjamin99 closed 2 months ago

benjamin99 commented 2 months ago

Description

In the previous PR #61, we intended to utilize the keepAlive messages from the replication protocol as the hearbeat to ensure the connection btw the source PG and the application.

Unfortunately, the keepAlive messages will not be send if the client constanly reports the LSN to the WAL sender (which is exactly what we do in the PGXSource). To resolve the issue, we added the implementation to ask the WAL sender to reply the LSN reporting messages if needed (i.e. when not receiving the messages from the WAL sender with the specific period of time).