1 2 3 4 5 6 | crmmbqt=# select now() - pg_last_xact_replay_timestamp() as replication_delay; ┌───────────────────────┐ │ replication_delay │ ├───────────────────────┤ │ 1 day 05:45:26.277667 │ └───────────────────────┘ |
1 | crmmbqt=# pg_last_xlog_receive_location(), pg_last_xlog_replay_location(), pg_last_xact_replay_timestamp(), case when pg_last_xlog_receive_location() = pg_last_xlog_replay_location() then 0 else extract(epoch from now() - pg_last_xact_replay_timestamp()) end as replication_delay; |