pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Ribe <scott_ribe@elevated-dev.com>
To: Igor Neyman <ineyman@perceptron.com>
Cc: hydra <hydrapolic@gmail.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: replication consistency checking
Date: Fri, 5 Jun 2015 08:56:54 -0600
Message-ID: <D9E31A4B-66EB-426D-A418-2C29578E305E@elevated-dev.com> (raw)
In-Reply-To: <A76B25F2823E954C9E45E32FA49D70ECCD45F26C@mail.corp.perceptron.com>
References: <CAG6MAzRaONc703e1PLQZig9PZVuOeLBr=Cc_CsK9ewr-hXbAag@mail.gmail.com>
	<CAL_0b1s9ZE1=ZRVySGE-Q3jLJC4U_O1y_PzN-R1vUbnNb7hKhg@mail.gmail.com>
	<CAG6MAzRW57SFsYXXBi213FK1yKrgOcprkxfHEib6+1pLyO6YVA@mail.gmail.com>
	<A76B25F2823E954C9E45E32FA49D70ECCD45F1BC@mail.corp.perceptron.com>
	<CAG6MAzQNQPRSsRL6629id-5i2jv6AQZ0y25=YYU2M3CJAOCiTg@mail.gmail.com>
	<A76B25F2823E954C9E45E32FA49D70ECCD45F26C@mail.corp.perceptron.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

On Jun 5, 2015, at 8:42 AM, Igor Neyman <ineyman@perceptron.com> wrote:
> 
> The problem I see with “checksum utility” is that for it to work both compared servers should be “static”:  not transactions while it does its job.

Indeed, and that was brought up before and OP seems to be ignoring it. What magic does MySQL (supposedly) use to compare databases without interfering with updates?

One could imagine a built-in feature in PG which depends on using MVCC and having both sides look at the same snapshot. (Which would require repeatable reads.)

But for an external utility, that's quite a bit harder. One suggestion which would involve minimal interruption to processing: if you have a snapshottable file system, shut down master, take snapshot, shut down replica, bring master back up, snapshot replica, bring it back up. You *still* have the issue of making sure that at the moment you take master down all changes have been streamed to replica, and the (easier) issue of making sure replica has applied them before taking its snapshot... But if you can manage to pull that off, then you can checksum & compare as much as you want, *IF* you can actually pull that off correctly ;-)

-- 
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 (34+ messages)  latest in thread

Message-ID: <D9E31A4B-66EB-426D-A418-2C29578E305E@elevated-dev.com>
Permalink:  ../D9E31A4B-66EB-426D-A418-2C29578E305E@elevated-dev.com/
Also on:    postgresql.org/message-id/D9E31A4B-66EB-426D-A418-2C29578E305E@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, ineyman@perceptron.com, hydrapolic@gmail.com
  Subject: Re: replication consistency checking
  In-Reply-To: <D9E31A4B-66EB-426D-A418-2C29578E305E@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