in reply to Verifying 2 databases are in sync with brute force
It takes 2 hours to dump a backup
Iterating over the whole database in Perl will take even longer. So doing the dump on both DB's and comparing checksums of the dumps is probably faster than any full Perl solution.
There's also pg-comparator, which might be worth looking at.
Another possible trick is to aggregate all rows of a table into a single one using array_agg or one of its companions, and implement a checksum in postgres itself (or maybe there's one available already?). That way less data needs to be transferred out of the DB, making the process much faster.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Verifying 2 databases are in sync with brute force
by dwhite20899 (Friar) on May 31, 2011 at 17:26 UTC | |
by moritz (Cardinal) on Jun 01, 2011 at 06:29 UTC | |
|
Re^2: Verifying 2 databases are in sync with brute force
by perlfan (Parson) on Jun 01, 2011 at 14:32 UTC |