视图如下所示: test=# \d pg_stat_replicationView"pg_catalog.pg_stat_replication"Column|Type|Collation|Nullable|Default---+---+---+---+---pid|integer|||usesysid|oid|||usename|name|||application_name|text|||client_addr|inet|||client_hostname|text|||client_port|integer|||backend_start...
W.sync_priority, W.sync_state, W.reply_time FROM pg_stat_get_activity(NULL) AS S JOIN pg_stat_get_wal_senders() AS W ON (S.pid = W.pid) LEFT JOIN pg_authid AS U ON (S.usesysid = U.oid); 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18...
sync_state | text | | | reply_time | timestamp with time zone| | | 多年来,此视图中的列数已大大增加,但是,让我们首先讨论一些基础知识。 pg_stat_replication:WAL Sender信息 人们经常说 pg_stat_replication视图是primary端的,这是不对的。该视图的作用是揭示有关wal sender进程的信息。换句话说:如果...
postgres=#select*frompg_stat_replication ; pid|usesysid|usename|application_name|client_addr|client_hostname|client_port|backend_start|backend_xmin|state|sent_lsn|write_lsn|flush_lsn|replay _lsn|write_lag|flush_lag|replay_lag|sync_priority|sync_state---+---+---+---+---+---+---+--...
state | text | | |sent_lsn | pg_lsn | | |write_lsn | pg_lsn | | |flush_lsn | pg_lsn | | |replay_lsn | pg_lsn | | |write_lag | interval | | |flush_lag | interval | | |replay_lag | interval | | |sync_priority | integer | | |sync_state | text | | |reply_time...
sync_state | text | | | reply_time | timestamp with time zone| | | 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 注:该视图中的列,多年来也在不断增加或改动,所以你在你的数据库上看到的可能与上表,有不同的地方。
Log replication state: Catch-up state Consistent streaming state sender_sent_location text Location where the sender sends logs receiver_write_location text Location where the receiver writes logs receiver_flush_location text Location where the receive end flushes logs receiver_replay_location text Loc...
backend_start|timestampwithtime zone|||backend_xmin|xid|||state|text|||sent_lsn|pg_lsn|||write_lsn|pg_lsn|||flush_lsn|pg_lsn|||replay_lsn|pg_lsn|||write_lag|interval|||flush_lag|interval|||replay_lag|interval|||sync_priority|integer|||sync_state|text|||reply_time|timestampwith...
W.sync_state FROM pg_stat_get_activity(NULL) AS S JOIN pg_stat_get_wal_senders() AS W ON (S.pid = W.pid) LEFT JOIN pg_authid AS U ON (S.usesysid = U.oid); sent_lsn,write_lsn等指标来自pg_stat_get_wal_senders函数 Datum ...
sync_state | text | | | reply_time | timestamp with time zone| | | 多年来,此视图中的列数已大大增加,但是,让我们首先讨论一些基础知识。 pg_stat_replication:WAL Sender信息 人们经常说 pg_stat_replication视图是primary端的,这是不对的。该视图的作用是揭示有关wal sender进程的信息。换句话说:如果...