Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D608A6500F9 for ; Tue, 8 Jul 2008 11:28:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 17476-01 for ; Tue, 8 Jul 2008 11:28:23 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by postgresql.org (Postfix) with ESMTP id EDCB96500B8 for ; Tue, 8 Jul 2008 11:28:28 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Tue, 08 Jul 2008 09:28:26 -0500 Message-Id: <4873335D.EE98.0025.0@wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 7.0.3 Date: Tue, 08 Jul 2008 09:28:14 -0500 From: "Kevin Grittner" To: "Michael Nacos" , Subject: Re: How do i compare 2 postgresql instanses ? References: <49982.1215520948@ismartpanache.com> <200807081602.39336.achill@matrix.gatewaynet.com> <407fa4640807080620r33a3463fgff195d8ae5ef708e@mail.gmail.com> In-Reply-To: <407fa4640807080620r33a3463fgff195d8ae5ef708e@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/86 X-Sequence-Number: 29696 >>> "Michael Nacos" wrote: > what if you actually want to look at the data? I have been > thinking about row checksums, would you say this would be a reasonable way > of verifying two databases are equivalent? Our home-grown replication technique does synchronization checks during idle time. It works pretty well for us, and we do use md5sum techniques to minimize bandwidth. In summary, a process requests a middle tier on a "source" machine to send "sync" information; that middle tier reads some set of rows and sends the md5 sum of all data in the rows, along with information on what rows from which table were used to develop the number. The requesting process then asks similar middle tiers on all replication targets to return their md5sum for the same set of rows. If there are any differences, the source and all differing replication targets are queried for the actual values, which are compared using match-merge type logic on the primary key sequence. Something similar might work for you. -Kevin