Search Postgresql Archives

Re: Live steraming replication setup issue!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, Feb 23, 2016 at 10:02 AM, Ashish Chauhan <Ashish.Chauhan@xxxxxxxxxxx> wrote:

Thanks Venkata, I am able to setup replication now. Just wondering when I check replication_delay and lag, I am getting negative number, any idea why?

 

receive    |    replay    | replication_delay | lag

--------------+--------------+-------------------+-----

796/BA9D8000 | 796/BA9D7FF0 | -00:00:01.612415  |  -2


The WAL records in receive and replay means the same WAL record, please see below :

postgres=# select pg_xlogfile_name('796/BA9D8000');
     pg_xlogfile_name    
--------------------------
 0000000100000796000000BA
(1 row)

postgres=# select pg_xlogfile_name('796/BA9D7FF0');
     pg_xlogfile_name    
--------------------------
 0000000100000796000000BA
(1 row)

That means the replication is continuously streaming and may behind few WAL records. Do you see the lag all the time ? Did you test if the replication is working fine ?

You can check that via pg_controldata as well. What does sync_state in pg_stat_replication say ?

Regards,
Venkata B N

Fujitsu Australia


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux