Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 6033B650109 for ; Tue, 8 Jul 2008 10:21:09 -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 51971-08 for ; Tue, 8 Jul 2008 10:20:55 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.224]) by postgresql.org (Postfix) with ESMTP id AF637650125 for ; Tue, 8 Jul 2008 10:20:59 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id c49so1729691wra.19 for ; Tue, 08 Jul 2008 06:20:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=ZNqaYam65XJ1JAQFs564gNaUVPuW50odzGiQcr+fvuI=; b=Pr/gD9bJBLa2y4rQBvm3TYkRlCqDv1oKMtG47aVBPJDQaDjAGpFBlUug/M4LFNWqpN hn8Kjs+qC++1yPKHuY3rqHW3iIoI8p3GfouwUGUZjxC2LUjKnwDuRVZKfrTOX4d1Rhgj z1Ng+AtGKJyeP06SRkR862XsdNxMMz8uPtzqM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=HXM6Nve+N836zjMuxqEi6qj0Z0zIADivV9AXUvpZ3ax/PzXQpl0nmP+BEhUsd/u1MM DZDmP7K0uHezLjppw/Gvr/6uLQGxaByBBd+jY/Sz06iryNsDImn8/tc6uiO48iydYDlP NRqyAeAYcENpFjd7In4V1qBZA0c5s8vMKEYdM= Received: by 10.90.74.7 with SMTP id w7mr6942759aga.45.1215523258398; Tue, 08 Jul 2008 06:20:58 -0700 (PDT) Received: by 10.90.55.11 with HTTP; Tue, 8 Jul 2008 06:20:58 -0700 (PDT) Message-ID: <407fa4640807080620r33a3463fgff195d8ae5ef708e@mail.gmail.com> Date: Tue, 8 Jul 2008 14:20:58 +0100 From: "Michael Nacos" To: pgsql-admin@postgresql.org Subject: Re: How do i compare 2 postgresql instanses ? In-Reply-To: <200807081602.39336.achill@matrix.gatewaynet.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_26620_30643805.1215523258388" References: <49982.1215520948@ismartpanache.com> <200807081602.39336.achill@matrix.gatewaynet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=AWL=-0.001, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200807/85 X-Sequence-Number: 29695 ------=_Part_26620_30643805.1215523258388 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello there. Simple counts can certainly prove two databases are not the same version. But 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? I have many other things on my mind, so I haven't tried implementing this yet. Michael > you could write a little program (awk) to produce an sql file of the form: > select count(*) from airlines; > select count(*) from airports; > select count(*) from airticket; > select count(*) from airticketflights; > .... > select count(*) from zzzobjects; > > and then run it against the two databases, and diff the outputs. > If the outputs are not identical then you have 2 different databases, > otherwise you have to search more to know the answer. > So this technique can prove that yours DBs are *not* identical, but does > not say anything > about the opposite. > > -- > Achilleas Mantzios > > ------=_Part_26620_30643805.1215523258388 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello there. Simple counts can certainly prove two databases are not the same version. But 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? I have many other things on my mind, so I haven't tried implementing this yet.

Michael


you could write a little program (awk) to produce an sql file of the form:
select count(*) from airlines;
select count(*) from airports;
select count(*) from airticket;
select count(*) from airticketflights;
....
select count(*) from zzzobjects;

and then run it against the two databases, and diff the outputs.
If the outputs are not identical then you have 2 different databases,
otherwise you have to search more to know the answer.
So this technique can prove that yours DBs are *not* identical, but does not say anything
about the opposite.

--
Achilleas Mantzios


------=_Part_26620_30643805.1215523258388--