vyshu Ysh Asked: 2018-09-28 02:22:30 +0800 CST2018-09-28 02:22:30 +0800 CST 2018-09-28 02:22:30 +0800 CST 检查主服务器是否从从服务器启动(复制)postgresql 772 我想通过从从服务器查询来检查我的主服务器是否已启动?有任何视图或命令吗? postgresql c# 1 个回答 Voted Best Answer Yavuz Selim 2018-09-28T05:20:23+08:002018-09-28T05:20:23+08:00 我想把它写成评论,但我没有足够的声誉。你试过了pg_stat_wal_receiver吗?它与 PostgreSQL-9.6 一起提供。 dbs=# select * from pg_stat_wal_receiver ; -[ RECORD 1 ]---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pid | 12345 status | streaming receive_start_lsn | B0/F0000000 receive_start_tli | 1 received_lsn | CE/13C7B18 received_tli | 1 last_msg_send_time | 2018-09-26 16:15:25 last_msg_receipt_time | 2018-09-26 16:15:25 latest_end_lsn | CE/13C7B18 latest_end_time | 2018-09-26 16:15:25 slot_name | conninfo | connection info https://www.postgresql.org/docs/9.6/static/monitoring-stats.html#PG-STAT-WAL-RECEIVER-VIEW
我想把它写成评论,但我没有足够的声誉。你试过了
pg_stat_wal_receiver
吗?它与 PostgreSQL-9.6 一起提供。https://www.postgresql.org/docs/9.6/static/monitoring-stats.html#PG-STAT-WAL-RECEIVER-VIEW