Question about monitoring PostgreSQL 10 streaming replication health - Mailing list pgsql-general

From Bilal Abdulkadir Muhammed
Subject Question about monitoring PostgreSQL 10 streaming replication health
Date
Msg-id CAJ1M1K2cvOYx=5G5-bbnAQcLYFNi8ngsx55ORs82mPASJwYRQQ@mail.gmail.com
Whole thread
List pgsql-general
Hello PostgreSQL community,

I am monitoring a PostgreSQL 10 standby server using:

pg_last_xlog_receive_location()
and
pg_last_xlog_replay_location()

The current query only checks replay lag. I would like guidance on a more comprehensive monitoring approach that can detect:

1. Standby disconnected from the primary.
2. WAL receiver process stopped.
3. Required WAL segment removed from the primary
   (for example: "requested WAL segment has already been removed").

I would like to know:
- Which SQL checks are recommended for these scenarios?
- Which conditions require external monitoring or log analysis?
- What is the recommended practice for monitoring PostgreSQL 10 streaming replication health?

Thank you.

Bilal Abdulkadir Muhammed


pgsql-general by date:

Previous
From: Justin
Date:
Subject: Re: Transaction Isolation level for ERP software
Next
From: aadish ajay
Date:
Subject: Feedback wanted: a framework where Postgres is the entire backend (no ORM/API layer)