postgres=# select * from pg_stat_replication;
-[ RECORD 1 ]----+------------------------------
pid | 31700
usesysid | 16384
usename | repl
application_name | walreceiver
client_addr | 192.168.1.72
client_hostname |
client_port | 43210
backend_start | 2022-09-23 20:53:39.313239+08
backend_xmin |
state | streaming
sent_lsn | 2/80000000
write_lsn | 2/80000000
flush_lsn | 2/80000000
replay_lsn | 2/80000000
write_lag |
flush_lag |
replay_lag |
sync_priority | 0
sync_state | async
reply_time | 2022-09-23 20:53:59.57744+08
image.png
关于write_lag,flush_lag,replay_lag所指的范围,另外箭头尖的指向分别为send_lsn,write_lsn,flush_lsn,replay_lsn