Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 5F0216500B8 for ; Tue, 8 Jul 2008 10:02:49 -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 36039-05 for ; Tue, 8 Jul 2008 10:02:40 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by postgresql.org (Postfix) with ESMTP id 418FB6500A4 for ; Tue, 8 Jul 2008 10:02:45 -0300 (ADT) Received: from smadev.internal.net (localhost [127.0.0.1]) by smadev.internal.net (8.14.2/8.14.2) with ESMTP id m68D2e6h058054; Tue, 8 Jul 2008 16:02:40 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.14.2/8.14.2/Submit) id m68D2dF8058053; Tue, 8 Jul 2008 16:02:39 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: pgsql-admin@postgresql.org, spotluri@ismartpanache.com Subject: Re: How do i compare 2 postgresql instanses ? Date: Tue, 8 Jul 2008 16:02:39 +0300 User-Agent: KMail/1.9.7 References: <49982.1215520948@ismartpanache.com> In-Reply-To: <49982.1215520948@ismartpanache.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200807081602.39336.achill@matrix.gatewaynet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/84 X-Sequence-Number: 29694 =CE=A3=CF=84=CE=B9=CF=82 Tuesday 08 July 2008 15:42:28 =CE=BF/=CE=B7 Potlur= i Srikanth =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: >=20 > How do i compare 2 postgresql instanses ? > 1) compare all objects including data in tables a) production box b) > DR site ? > can you help me with the query, through which i can get all the > object of each schema/database ? > Regards,=20 > Srikanth k Potluri=20 >=20 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; =2E... 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 no= t say anything about the opposite. =2D-=20 Achilleas Mantzios