Correct query to check streaming replication lag

Поиск
Список
Период
Сортировка
От Granthana Biswas
Тема Correct query to check streaming replication lag
Дата
Msg-id CAACh-pXG=a_xyMKzj0odARyu0ZUiXOgymJEZ1omc_zL1BJqCcQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Correct query to check streaming replication lag
Список pgsql-general
Hello All,

Can anyone please tell me which of the following is the correct replication lag query to find streaming replication lag in seconds?

1. SELECT extract(seconds from (now() - pg_last_xact_replay_timestamp())) AS time_lag;

2. SELECT 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 log_delay;


Regards,
Granthana

В списке pgsql-general по дате отправления:

Предыдущее
От: Torsten Förtsch
Дата:
Сообщение: Re: question about checksum in 9.3
Следующее
От: Ming Li
Дата:
Сообщение: non-zero xmax yet visible