pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Cassaniti <m.cassaniti@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Notification or action when WAL archives fully restored and streaming replication started
Date: Thu, 14 Mar 2019 18:57:52 +1100
Message-ID: <e5f7d6dc-70f8-236d-9c0a-28f6ff7a8c66@gmail.com> (raw)
In-Reply-To: <f3410430-dd8d-1ea5-86c3-058ba7e4d4b0@gmail.com>
References: <9b97926f-ba7f-2fb1-bb4f-74ed33e49c2b@cassaniti.id.au>
	<8aee6f5f-6ed8-ed96-f1f4-ec8a38305eed@gmail.com>
	<20190314041019.GF3493@paquier.xyz>
	<f3410430-dd8d-1ea5-86c3-058ba7e4d4b0@gmail.com>


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 14/3/19 5:15 pm, Michael Cassaniti wrote:
> > 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 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 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. Actually I was wrong. For some reason my testing initially
didn't want to allow read-only connections. Problem solved.
-----BEGIN PGP SIGNATURE-----

iG0EAREIAB0WIQT0DIHSqEo48gI0VT9pF1oDt4Q+5wUCXIoJgAAKCRBpF1oDt4Q+
53AnAOCQSbaOZy+K1qR8C3+EjBWshY0qwwVmHIG+Khy0AOCmAS+TgqE+mngBzpx5
jgMbyjaDn2RXvS14xW68
=sk4C
-----END PGP SIGNATURE-----






view thread (4+ messages)

Message-ID: <e5f7d6dc-70f8-236d-9c0a-28f6ff7a8c66@gmail.com>
Permalink:  ../e5f7d6dc-70f8-236d-9c0a-28f6ff7a8c66@gmail.com/
Also on:    postgresql.org/message-id/e5f7d6dc-70f8-236d-9c0a-28f6ff7a8c66@gmail.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: m.cassaniti@gmail.com, michael@paquier.xyz
  Subject: Re: Notification or action when WAL archives fully restored and streaming replication started
  In-Reply-To: <e5f7d6dc-70f8-236d-9c0a-28f6ff7a8c66@gmail.com>
  References: <9b97926f-ba7f-2fb1-bb4f-74ed33e49c2b@cassaniti.id.au> <8aee6f5f-6ed8-ed96-f1f4-ec8a38305eed@gmail.com> <20190314041019.GF3493@paquier.xyz> <f3410430-dd8d-1ea5-86c3-058ba7e4d4b0@gmail.com> <e5f7d6dc-70f8-236d-9c0a-28f6ff7a8c66@gmail.com>

* 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