pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: Pawan Sharma <pawanpg0963@gmail.com>
Cc: " <pgsql-general@postgresql.org>
Subject: Re: Check Replication lag
Date: Mon, 11 Oct 2021 14:52:04 +0200
Message-ID: <20211011125204.GA18100@depesz.com> (raw)
In-Reply-To: <CAKqG8NUJUdj4Jz0+zTwQF2xnQ4EEmiXJxsxS3L=SGAg0-3ifOg@mail.gmail.com>
References: <CAKqG8NUJUdj4Jz0+zTwQF2xnQ4EEmiXJxsxS3L=SGAg0-3ifOg@mail.gmail.com>

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






view thread (5+ messages)  latest in thread

Message-ID: <20211011125204.GA18100@depesz.com>
Permalink:  ../20211011125204.GA18100@depesz.com/
Also on:    postgresql.org/message-id/20211011125204.GA18100@depesz.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: depesz@depesz.com, pawanpg0963@gmail.com
  Subject: Re: Check Replication lag
  In-Reply-To: <20211011125204.GA18100@depesz.com>
  References: <CAKqG8NUJUdj4Jz0+zTwQF2xnQ4EEmiXJxsxS3L=SGAg0-3ifOg@mail.gmail.com> <20211011125204.GA18100@depesz.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox