agora inbox for pgsql-general@postgresql.org
help / color / mirror / Atom feedFrom: hubert depesz lubaczewski <depesz@depesz.com>
To: Bilal Abdulkadir Muhammed <bilalabdulkadir286@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Question about monitoring PostgreSQL 10 streaming replication health
Date: Tue, 21 Jul 2026 11:08:00 +0200
Message-ID: <al828K45DEMDdIB_@depesz.com> (raw)
In-Reply-To: <CAJ1M1K2cvOYx=5G5-bbnAQcLYFNi8ngsx55ORs82mPASJwYRQQ@mail.gmail.com>
References: <CAJ1M1K2cvOYx=5G5-bbnAQcLYFNi8ngsx55ORs82mPASJwYRQQ@mail.gmail.com>
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
view thread (2+ messages)
Message-ID: <al828K45DEMDdIB_@depesz.com>
Permalink: ../al828K45DEMDdIB_@depesz.com/
Also on: postgresql.org/message-id/al828K45DEMDdIB_@depesz.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-general@postgresql.org
Cc: depesz@depesz.com, bilalabdulkadir286@gmail.com, pgsql-general@lists.postgresql.org
Subject: Re: Question about monitoring PostgreSQL 10 streaming replication health
In-Reply-To: <al828K45DEMDdIB_@depesz.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox