Determining replication lag

Поиск
Список
Период
Сортировка
От rakeshkumar464
Тема Determining replication lag
Дата
Msg-id 1480692380242-5933003.post@n3.nabble.com
обсуждение исходный текст
Список pgsql-general
I found the following SQL in stackoverflow:

SELECT
  pg_last_xlog_receive_location() receive,
  pg_last_xlog_replay_location() replay,
  (
   extract(epoch FROM now()) -
   extract(epoch FROM pg_last_xact_replay_timestamp())
  )::int lag

I get different result in primary and slave. On primary the col lag always
shows some number, usually more than 3000, but on slave it is always zero.
Why the discrepancy ?





--
View this message in context: http://postgresql.nabble.com/Determining-replication-lag-tp5933003.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

Предыдущее
От: cen
Дата:
Сообщение: Full text search randomly not working for short prefixes?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Full text search randomly not working for short prefixes?