psql -d appdb -c "SELECT * FROM pg_stat_replication;"
Show replication status to standbys
Lists each standby, its WAL receive position, and lag against the primary. Empty output on a standalone server is normal. Watch the lag columns to confirm standbys are keeping up.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.