Re: replication consistency checking - Mailing list pgsql-admin

From Scott Ribe
Subject Re: replication consistency checking
Date
Msg-id D9E31A4B-66EB-426D-A418-2C29578E305E@elevated-dev.com
Whole thread Raw
In response to Re: replication consistency checking  (Igor Neyman <ineyman@perceptron.com>)
Responses Re: replication consistency checking  (hydra <hydrapolic@gmail.com>)
Re: replication consistency checking  (Jan Lentfer <Jan.Lentfer@web.de>)
List pgsql-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
transactionswhile 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
comparedatabases 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.
(Whichwould 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
backup, snapshot replica, bring it back up. You *still* have the issue of making sure that at the moment you take
masterdown all changes have been streamed to replica, and the (easier) issue of making sure replica has applied them
beforetaking 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







pgsql-admin by date:

Previous
From: Igor Neyman
Date:
Subject: Re: replication consistency checking
Next
From: sinasaharkhiz
Date:
Subject: Decreasing the data loss after failover