agora inbox for pgsql-general@postgresql.org  
help / color / mirror / Atom feed
Question about monitoring PostgreSQL 10 streaming replication health
2+ messages / 2 participants
[nested] [flat]

* Question about monitoring PostgreSQL 10 streaming replication health
@ 2026-07-20 14:23 Bilal Abdulkadir Muhammed <bilalabdulkadir286@gmail.com>
  2026-07-21 09:08 ` Re: Question about monitoring PostgreSQL 10 streaming replication health hubert depesz lubaczewski <depesz@depesz.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Bilal Abdulkadir Muhammed @ 2026-07-20 14:23 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

*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
bilalabdulkadir286@gmail.com

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Question about monitoring PostgreSQL 10 streaming replication health
  2026-07-20 14:23 Question about monitoring PostgreSQL 10 streaming replication health Bilal Abdulkadir Muhammed <bilalabdulkadir286@gmail.com>
@ 2026-07-21 09:08 ` hubert depesz lubaczewski <depesz@depesz.com>
  0 siblings, 0 replies; 2+ messages in thread

From: hubert depesz lubaczewski @ 2026-07-21 09:08 UTC (permalink / raw)
  To: Bilal Abdulkadir Muhammed <bilalabdulkadir286@gmail.com>; +Cc: pgsql-general@lists.postgresql.org

On Mon, Jul 20, 2026 at 05:23:07PM +0300, Bilal Abdulkadir Muhammed wrote:
> 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.

You can see this in https://pgdoc.link/pg_stat_replication@10

> 2. WAL receiver process stopped.

Not sure how this is different than #1

> 3. Required WAL segment removed from the primary
>    (for example: "requested WAL segment has already been removed").

Check logs, and also check for existence of streaming.

> I would like to know:
> - Which SQL checks are recommended for these scenarios?
> - Which conditions require external monitoring or log analysis?

I would always monitor logs for errors.

> - What is the recommended practice for monitoring PostgreSQL 10 streaming
> replication health?

The recommended practice is to upgrade. Pg 10 stopped being *supported*
almost 4 years ago!

Upgrade to something that is supported. Preferably newest possible (18
now, 19 by the end of this year).

Best regards,

depesz







^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-07-21 09:08 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-07-20 14:23 Question about monitoring PostgreSQL 10 streaming replication health Bilal Abdulkadir Muhammed <bilalabdulkadir286@gmail.com>
2026-07-21 09:08 ` hubert depesz lubaczewski <depesz@depesz.com>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox