pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Ribe <scott_ribe@elevated-dev.com>
To: Graeme B. Bell <grb@skogoglandskap.no>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: postgres hot-standby questions.
Date: Thu, 26 Mar 2015 10:09:08 -0600
Message-ID: <604F46E7-7F6C-485B-BB72-21378D341F94@elevated-dev.com> (raw)
In-Reply-To: <A8D5B7E4-31EF-4C5B-B0CC-F6514B50C79B@skogoglandskap.no>
References: <848F3721-4A21-4260-9640-8F698E3EE376@skogoglandskap.no>
	<3C08D5DD-0702-4136-BBE3-21CBE064ADDE@elevated-dev.com>
	<A8D5B7E4-31EF-4C5B-B0CC-F6514B50C79B@skogoglandskap.no>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

On Mar 26, 2015, at 9:43 AM, Graeme B. Bell <grb@skogoglandskap.no> wrote:
> 
> Do you know if using the trigger file makes any change to the DB or WAL which couldn't be replicated on the master when it comes back up? 

No. It just signals PG to come out of continuous recovery mode and start allowing normal (read/write) operations. It also moves recovery.conf out of the way (to recovery.done) so that if PG is restarted, it does NOT go back into recovery mode and start trying to get updates from the former master.

> I could try to script it using e.g. pg_last_xlog_receive_location,  pg_last_xlog_replay_location, but that doesn't help so much when the DB decides to complete shutdown while the packet is still on the wire, and the packet goes missing. 

Yeah, that mostly tells you if your network is faster than your disk. (OK, not really, but you obviously know what I mean...) But try comparing pg_current_xlog_location on the master to pg_last_xlog_receive_location on the replica. You could also look into using the pg_stat_replication view. 

-- 
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice







-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (19+ messages)  latest in thread

Message-ID: <604F46E7-7F6C-485B-BB72-21378D341F94@elevated-dev.com>
Permalink:  ../604F46E7-7F6C-485B-BB72-21378D341F94@elevated-dev.com/
Also on:    postgresql.org/message-id/604F46E7-7F6C-485B-BB72-21378D341F94@elevated-dev.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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: scott_ribe@elevated-dev.com, grb@skogoglandskap.no
  Subject: Re: postgres hot-standby questions.
  In-Reply-To: <604F46E7-7F6C-485B-BB72-21378D341F94@elevated-dev.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