On Mar 26, 2015, at 9:43 AM, Graeme B. Bell <grb@xxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin