Created
February 25, 2013 16:07
-
-
Save dc2447/5030860 to your computer and use it in GitHub Desktop.
Short Bash Script to get the replication delay on Postgres
This file contains hidden or 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
#!/bin/bash | |
echo -n "Replication delay on ${HOSTNAME}: " | |
psql -tA -Upostgres -c 'SELECT NOW() - pg_last_xact_replay_timestamp() AS replication_delay' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment