Skip site navigation (1) Skip section navigation (2)

Re: How do i compare 2 postgresql instanses ?

From: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: pgsql-admin(at)postgresql(dot)org, spotluri(at)ismartpanache(dot)com
Subject: Re: How do i compare 2 postgresql instanses ?
Date: 2008-07-08 13:02:39
Message-ID: 200807081602.39336.achill@matrix.gatewaynet.com (view raw or flat)
Thread:
Lists: pgsql-admin
Στις 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

In response to

Responses

pgsql-admin by date

Next:From: Michael NacosDate: 2008-07-08 13:20:58
Subject: Re: How do i compare 2 postgresql instanses ?
Previous:From: Potluri SrikanthDate: 2008-07-08 12:42:28
Subject: How do i compare 2 postgresql instanses ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group