pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Anders Wegge Keller <wegge@wegge.dk>
To: pgsql-admin@postgresql.org
Subject: Detect when streaming replication stops streaming.
Date: Thu, 4 Oct 2018 12:13:22 +0200
Message-ID: <20181004121322.39ebda6c@linuxawk.wegge.dk> (raw)

Is there a reliable way to detect, on the standby, that continuous recovery
have stopped for any reason? I'm adding a postgres 9.2(1) database to an
industrial control system that have to run unattended. Thus, I need to plan
for some really exotic failure modes, like e.g. loss of network connectivity
in an indefinitely long period. 

On the master system, I can check for the existence of the proper row in
pg_stat_replication. If that is missing, I can report a degraded status on
the whole system. However, on the standby side, I've been unable to find
something similar. Especially the failure mode where the standby return from
a long period of no network connectivity, where the master no longer have
the WAL segments needed to catch up. Snooping for FATAL in
pg_log/Postgres-xxx is error prone, and I'd rather not go the route of
polling the master system for a situation that should be detectable on the
standby instance. 


-- 
//Wegge

1. Yes, I know it's no longer supported, but that's the way of redhat. 




view thread (4+ messages)  latest in thread

Message-ID: <20181004121322.39ebda6c@linuxawk.wegge.dk>
Permalink:  ../20181004121322.39ebda6c@linuxawk.wegge.dk/
Also on:    postgresql.org/message-id/20181004121322.39ebda6c@linuxawk.wegge.dk

 · 

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-admin@postgresql.org
  Cc: wegge@wegge.dk
  Subject: Re: Detect when streaming replication stops streaming.
  In-Reply-To: <20181004121322.39ebda6c@linuxawk.wegge.dk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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