pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-admin@postgresql.org
To: spotluri@ismartpanache.com
Subject: Re: How do i compare 2 postgresql instanses ?
Date: Tue, 8 Jul 2008 16:02:39 +0300
Message-ID: <200807081602.39336.achill@matrix.gatewaynet.com> (raw)
In-Reply-To: <49982.1215520948@ismartpanache.com>
References: <49982.1215520948@ismartpanache.com>

Στις Tuesday 08 July 2008 15:42:28 ο/η Potluri Srikanth έγραψε:
> 
>  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, 
>  Srikanth k Potluri 
> 

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



view thread (5+ messages)  latest in thread

Message-ID: <200807081602.39336.achill@matrix.gatewaynet.com>
Permalink:  ../200807081602.39336.achill@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/200807081602.39336.achill@matrix.gatewaynet.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: achill@matrix.gatewaynet.com, spotluri@ismartpanache.com
  Subject: Re: How do i compare 2 postgresql instanses ?
  In-Reply-To: <200807081602.39336.achill@matrix.gatewaynet.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