Detect when streaming replication stops streaming. - Mailing list pgsql-admin

From Anders Wegge Keller
Subject Detect when streaming replication stops streaming.
Date
Msg-id 20181004121322.39ebda6c@linuxawk.wegge.dk
Whole thread Raw
Responses Re: Detect when streaming replication stops streaming.
List pgsql-admin
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. 


pgsql-admin by date:

Previous
From: priyanka chatterjee
Date:
Subject: Re: Regarding Google Code In 2018 Mentor
Next
From: Joakim Lundgren
Date:
Subject: Takes long time to "fail back" using pg_rewind