2 ms·
Getting replication running on PostgreSQL is fairly easy, but monitoring it is a little more troublesome. Unfortunately, the amount of help out there for users
by nasalgoat 11y ago
Getting replication running on PostgreSQL is fairly easy, but monitoring it is a little more troublesome. Unfortunately, the amount of help out there for users is few and far between - half the time my Google searches turn up my own unanswered questions from a year ago.
Your best bet to see the current state of replication is on the master:
echo "select * from pg_stat_replication" | psql
That gives you a list of all the connected replicas, and where they are in the WAL process. It took me a lot of Googling to figure that one out and learn to interpret the output.