Last active
November 18, 2016 22:18
-
-
Save maxdanilov/85022c472e585ca3a70a6697d16d468f to your computer and use it in GitHub Desktop.
[PostgreSQL] Replication lag between primary and replica (in bytes)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT client_addr, pg_xlog_location_diff(pg_stat_replication.sent_location, pg_stat_replication.replay_location) AS byte_lag FROM pg_stat_replication; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment