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

Re: How do i compare 2 postgresql instanses ?

From: "Michael Nacos" <m(dot)nacos(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: How do i compare 2 postgresql instanses ?
Date: 2008-07-08 13:20:58
Message-ID: 407fa4640807080620r33a3463fgff195d8ae5ef708e@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-admin
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
>
>

In response to

Responses

pgsql-admin by date

Next:From: Kevin GrittnerDate: 2008-07-08 14:28:14
Subject: Re: How do i compare 2 postgresql instanses ?
Previous:From: Achilleas MantziosDate: 2008-07-08 13:02:39
Subject: Re: How do i compare 2 postgresql instanses ?

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