Re: Notification or action when WAL archives fully restored and streaming replication started

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Michael Cassaniti <m(dot)cassaniti(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Notification or action when WAL archives fully restored and streaming replication started
Date: 2019-03-14 04:10:19
Message-ID: 20190314041019.GF3493@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 14, 2019 at 02:59:38PM +1100, Michael Cassaniti wrote:
> I've got master/slave replication setup between a few hosts. At any
> point a slave could become a master. I've got appropriate locking in
> place using an external system so that only one master can exist at a
> time. I'm having trouble determining when my slaves are in sync with the
> current master so that they can be a candidate for promotion. I want
> some form of indicator _without reading a log_ when streaming
> replication has started.

pg_stat_replication on the primary, no? Here is its documentation:
https://www.postgresql.org/docs/11/monitoring-stats.html#MONITORING-STATS-VIEWS
--
Michael

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Munro 2019-03-14 04:18:49 Re: LDAP authenticated session terminated by signal 11: Segmentation fault, PostgresSQL server terminates other active server processes
Previous Message Michael Cassaniti 2019-03-14 03:59:38 Re: Notification or action when WAL archives fully restored and streaming replication started