Last active
August 29, 2017 06:25
-
-
Save jrasanen/b9bc0125f3da33bde1e657521cf40df2 to your computer and use it in GitHub Desktop.
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
-bash-4.1$ cat /usr/local/bin/pause_replication.sh | |
/opt/PostgreSQL/9.2/bin/psql -U postgres -c 'select pg_xlog_replay_pause();' | |
/opt/PostgreSQL/9.2/bin/psql -U postgres -c 'select now() - pg_last_xact_replay_timestamp() AS replication_delay;' | |
-bash-4.1$ cat /usr/local/bin/resume_replication.sh | |
/opt/PostgreSQL/9.2/bin/psql -U postgres -c 'select pg_xlog_replay_resume();' | |
/opt/PostgreSQL/9.2/bin/psql -U postgres -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