How to determine replication lag

Поиск
Список
Период
Сортировка
От Murthy Nunna
Тема How to determine replication lag
Дата
Msg-id BD7563973EF8894D905C80593EE9A4ED42CBC9@MAIL01.fnal.gov
обсуждение исходный текст
Ответы Re: How to determine replication lag  (Dan Herzog <dherzog@marchex.com>)
Список pgsql-admin

I am wondering if there is a way to find replication lag (in time seconds etc.) between primary and standby in case of STREAMING REPLICATION.

 

I can use the function pg_last_xact_replay_timestamp () as below. Only problem is IF THERE IS NO UPDATE ACTIVITY in primary database the output of the following query keeps increasing but in reality standby is in sync with primary data-wise.

 

 

SELECT EXTRACT (EPOCH FROM AGE(current_timestamp, pg_last_xact_replay_timestamp()) )

 

 

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

Предыдущее
От: Craig James
Дата:
Сообщение: Re: Stuck LSI 9650SE-12 RAID Controller
Следующее
От: "Joseph Mays"
Дата:
Сообщение: postgres-xc