PG comparator is a perl script that compares tables between two databases instances, generates a diff and applies it on the destination table.
./pg_comparator --checksum-function=md5 -S -D “pgsql://UUUUUUU:[email protected]/DBNAME/TABLENAME?id” pgsql://uuuuuuu:[email protected]:5432/testdb