Measuring replication lag time

Поиск
Список
Период
Сортировка
От Stuart Bishop
Тема Measuring replication lag time
Дата
Msg-id CADmi=6MBfhta6a4L3QVy4UN6xH8oj_CQ7+jLP1dui8TjZ9j4yg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Measuring replication lag time  (Venkat Balaji <venkat.balaji@verse.in>)
Re: Measuring replication lag time  (Greg Williamson <gwilliamson39@yahoo.com>)
Список pgsql-general
Hi.

I need to measure how far in the past a hot standby is, async
streaming replication.

On the Hot Standby, "select
age(current_timestamp,pg_last_xact_replay_timestamp())" gets me this
(or close enough for my purposes - I understand that if there are no
updates, there are no logs to replay and the lag time will increase).

Is there some way to get this same information on the master?
pg_stat_replication contains the log information, but I can't see how
to map this to a timestamp.

Is there a better way of measuring this?

--
Stuart Bishop <stuart@stuartbishop.net>
http://www.stuartbishop.net/

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

Предыдущее
От: Andrew Gould
Дата:
Сообщение: python3 module for accessing postgresql
Следующее
От: Daniele Varrazzo
Дата:
Сообщение: Re: python3 module for accessing postgresql