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

Re: How do i compare 2 postgresql instanses ?

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Michael Nacos" <m(dot)nacos(at)gmail(dot)com>,<pgsql-admin(at)postgresql(dot)org>
Subject: Re: How do i compare 2 postgresql instanses ?
Date: 2008-07-08 14:28:14
Message-ID: 4873335D.EE98.0025.0@wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-admin
>>> "Michael Nacos" <m(dot)nacos(at)gmail(dot)com> wrote: 
> 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?
 
Our home-grown replication technique does synchronization checks
during idle time.  It works pretty well for us, and we do use md5sum
techniques to minimize bandwidth.
 
In summary, a process requests a middle tier on a "source" machine to
send "sync" information; that middle tier reads some set of rows and
sends the md5 sum of all data in the rows, along with information on
what rows from which table were used to develop the number.  The
requesting process then asks similar middle tiers on all replication
targets to return their md5sum for the same set of rows.  If there are
any differences, the source and all differing replication targets are
queried for the actual values, which are compared using match-merge
type logic on the primary key sequence.
 
Something similar might work for you.
 
-Kevin

In response to

Responses

pgsql-admin by date

Next:From: Michael NacosDate: 2008-07-08 15:21:46
Subject: Re: How do i compare 2 postgresql instanses ?
Previous:From: Michael NacosDate: 2008-07-08 13:20:58
Subject: Re: How do i compare 2 postgresql instanses ?

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