From: | Pawan Sharma <pawanpg0963(at)gmail(dot)com> |
---|---|
To: | depesz(at)depesz(dot)com |
Cc: | "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Check Replication lag |
Date: | 2021-10-11 16:59:19 |
Message-ID: | CAKqG8NWJ9+A_jiRYTwuTZbrczoR0-gd2k5hvw0u0f3foFh=OoQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)depesz(dot)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
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Ram Pratap Maurya | 2021-10-12 06:42:33 | Avg/max size of these JSON docs in Postgres |
Previous Message | hubert depesz lubaczewski | 2021-10-11 12:52:04 | Re: Check Replication lag |