We're setting up streaming replication with one master and one (read-only) slave. We're now looking for a way to monitor the replication; mostly to verify that the slave server is still up-to-date.
Is it possible to do this — preferably from the slave? If so, how?
The documentation on streaming replication mentions the following:
On systems that support the keepalive socket option, setting tcp_keepalives_idle, tcp_keepalives_interval and tcp_keepalives_count helps the primary promptly notice a broken connection.
What does "promptly notice" mean in this context? Is there some error log where a broken connection gets reported?