Fwd: Monitoring Replication on Master/Slave Postgres(9.1) - Mailing list pgsql-admin

From Shams Khan
Subject Fwd: Monitoring Replication on Master/Slave Postgres(9.1)
Date
Msg-id CAM42boq7v8NeNVgvJ5NKQH3DV8hvoepBy1acG-mypS=LRhcW_w@mail.gmail.com
Whole thread Raw
In response to Monitoring Replication on Master/Slave Postgres(9.1)  (Shams Khan <shams.khan22@gmail.com>)
Responses Re: Fwd: Monitoring Replication on Master/Slave Postgres(9.1)  (Steve Crawford <scrawford@pinpointresearch.com>)
List pgsql-admin
Can anybody answer the below query???

---------- Forwarded message ----------
From: Shams Khan <shams.khan22@gmail.com>
Date: Mon, Nov 26, 2012 at 3:35 PM
Subject: Monitoring Replication on Master/Slave Postgres(9.1)
To: pgsql-admin@postgresql.org


HI All,

I want to know the ways to monitor the replication, whether the master and slave server are sync.
The way I am checking it is:

On Master:

[root@livedb1 ~]# ps -ef | grep sender
postgres  2152  7045  0 Nov05 ?        01:05:33 postgres: wal sender process postgres 10.0.0.2(45862) streaming 17A/35B62638
root     26030 10506  0 15:26 pts/2    00:00:00 grep sender

radius=# SELECT pg_current_xlog_location();
 pg_current_xlog_location
--------------------------
 17A/342A6F78
(1 row)


On slave database:

[root@liveDB2 ~]# ps -ef | grep receiver
root     11725  4286  0 15:28 pts/0    00:00:00 grep receiver
postgres 27250  3432  0 Nov05 ?        00:35:33 postgres: wal receiver process   streaming 17A/363EE668


radius=# select pg_last_xlog_receive_location();
 pg_last_xlog_receive_location
-------------------------------
 17A/34366C30
(1 row)

If I go to pg_xlog folder: I checked on slave WAL files are generated. However I could not find the same result whenever I run pg_current_xlog_location(); on master and on the other side I get the different number (on slave)

My question is how do we read these numbers(17A/342A6F78 and 17A/34366C30) I never got the same results on both servers. Is that mean slave is not synced with master?
If yes, then how do we ensure my replication is working fine?

Please share you knowledge and through some light.

thanx


pgsql-admin by date:

Previous
From: Scott Ribe
Date:
Subject: Re: NEED REPLICATION SOLUTION -POSTGRES 9.1
Next
From: Gabriel Muñoz
Date:
Subject: Re: NEED REPLICATION SOLUTION -POSTGRES 9.1