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.

SELECT pg_current_xlog_location();

SELECT pg_last_xlog_receive_location();


Popular posts from this blog

PostgreSQL Index

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

7 Steps to configure BDR replication in postgresql

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

vacuumlo - removing large objects orphans from a database PostgreSQL