Re: Check Replication lag

Поиск
Список
Период
Сортировка
От Pawan Sharma
Тема Re: Check Replication lag
Дата
Msg-id CAKqG8NWJ9+A_jiRYTwuTZbrczoR0-gd2k5hvw0u0f3foFh=OoQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Check Replication lag  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-general
Hello  Depesz, 

Thanks for your quick response, let me give some overview of our cluster setups.  Actually we have a Patroni cluster running with one replica (Replica 1) in the same data center with no data lag. whereas we have configured one more replica(Replica 2) in a different data center through AWS S3 WAL shipping and replaying. 

So we can easily check Patroni replica (Replica1) lag using the patronictl list command. but I am looking how I can check replication lag of Replica 2 which is configured through AWS.

As I have checked with above query I am getting same response from both the replicas. whereas on Replica2 there is some lag exist.


I have created dummy table on master node and its synced on replica1 simultaneously but it taking hours to sync on replica2.


Regards,
Pawan



  



On Mon, Oct 11, 2021 at 6:22 PM hubert depesz lubaczewski <depesz@depesz.com> wrote:
On Mon, Oct 11, 2021 at 05:58:03PM +0530, Pawan Sharma wrote:
> Is there a way to monitor the replication lag, where replica nodes are
> configured through aws s3.

You can check it on replica, by issuing:
select now() - pg_last_xact_replay_timestamp();

and it will show you, more or less, what is your current lag.

Best regards,

depesz

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

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: Check Replication lag
Следующее
От: Ram Pratap Maurya
Дата:
Сообщение: Avg/max size of these JSON docs in Postgres