Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Find Out Postgresql Replication Delay/Lag using Functions

By comparing Below two values you could see if the servers are in sync.The problem yet again is that if streaming replication fails, both of these functions will continue to return same values and you could still end up thinking the replication is working. But also you need to query both the master and slave to be able to monitor this, which is not that easy on monitoring systems, and you still don't have the information about the actual lag in seconds, so you would still need to run the first query.
Master:

SELECT pg_current_xlog_location();
Slave:

SELECT pg_last_xlog_receive_location();





Comments

Popular posts from this blog

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

2017 Shortern URL - Other Website Like ADFOC.US

How to Repair Corrupt database postgresql

How To Schedule PostgreSQL Jobs using pgAgent on Linux plateform

How to find the server is whether standby (slave) or primary(master) in Postgresql replication ?