From: | Kapil Agarwal <kapil(dot)agarwal(at)enterprisedb(dot)com> |
---|---|
To: | Satish K Biradar <satishbiradar1984(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Archive# views |
Date: | 2014-05-30 22:19:26 |
Message-ID: | CAORFk+PBansAov=pzua-RqKbMGb34_9Bz+giKpjmLukAJ5VJ5w@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Satish,
You can calculate the replication lag by comparing the current WAL write
location on the primary with the last WAL location received/replayed by the
standby. They can be retrieved using pg_current_xlog_location on the
primary and the pg_last_xlog_receive_location/pg_last_xlog_replay_location
on the standby, respectively.
*Master Server:*
SELECT pg_current_xlog_location();
*Slave server:*
select pg_last_xlog_receive_location();
select now() - pg_last_xact_replay_timestamp();
Hope this help.
On Fri, May 30, 2014 at 11:57 AM, Satish K Biradar <
satishbiradar1984(at)gmail(dot)com> wrote:
> Hello,
>
> I am a newbee to Postgresql and I want to build replication between master
> and slave servers(8.4). I was able to set it up but I cannot check archive#
> at master and slave servers as what was the last archive# generated at
> master and what is current archive# at Slave server that is being replayed.
>
> Is there any view in PostgreSQL with which I can find the details of
> Archive# generation at Master and archive# that is replaying currently or
> last/recent archive# that has replayed at slave server.
>
> So can you please provide me the commands as how to check the last archive#
> is generated at master and slave(being replayed), lag between master and
> slave servers.
>
>
> Thanks & regards,
> Satish K.
>
>
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/Archive-views-tp5805521.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
--
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2014-05-30 22:26:14 | Re: database system was interrupted sometimes untill we restart it can be used |
Previous Message | Dmitry Samonenko | 2014-05-30 21:06:42 | Re: libpq: indefinite block on poll during network problems |