Re: Notification or action when WAL archives fully restored andstreaming replication started - Mailing list pgsql-general

From Michael Cassaniti
Subject Re: Notification or action when WAL archives fully restored andstreaming replication started
Date
Msg-id f3410430-dd8d-1ea5-86c3-058ba7e4d4b0@gmail.com
Whole thread Raw
In response to Re: Notification or action when WAL archives fully restored andstreaming replication started  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Notification or action when WAL archives fully restored andstreaming replication started  (Michael Cassaniti <m.cassaniti@gmail.com>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 14/3/19 3:10 pm, Michael Paquier wrote:
> On Thu, Mar 14, 2019 at 02:59:38PM +1100, Michael Cassaniti wrote: >> I've got master/slave replication setup between
afew 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 This at least points me in the right direction. I need
something on the receiver side, so the state column in
pg_stat_wal_receiver might cover. I can check for state = streaming, but
the DB won't accept connections in standby mode.

Thanks for the quick reply.
-----BEGIN PGP SIGNATURE-----

iG0EAREIAB0WIQT0DIHSqEo48gI0VT9pF1oDt4Q+5wUCXInxjAAKCRBpF1oDt4Q+
562uAOCX3SfCi4ppOd0hBhzsdRWh/3yPeMm8F7c7BgrWAN4tGe+7RnRMrLeE6pOU
/5kdwISbxH6fmBEZ1CZM
=qCpv
-----END PGP SIGNATURE-----




pgsql-general by date:

Previous
From: Rene Romero Benavides
Date:
Subject: Re: PostgreSQL temp table blues
Next
From: Vijaykumar Jain
Date:
Subject: Re: [External] Re: PostgreSQL temp table blues