New Project: pgdatadiff
pgdatadiff is a small python utility that connects to 2 different postgres databases and compares:
- Row counts
- Sequence values
- Table data (in chunks)
It will tell you quickly if there are differences.
The use-case I developed it for was to ensure that replication was working correctly while using pglogical
It can be installed using pip install pgdatadiff
and you can then run it using the pgdatadiff
command.
General usgae is like this:
✗ pgdatadiff --firstdb=postgres://postgres:password@dbserver/world1 --seconddb=postgres://postgres:password@dbserver/world2
Check out in action: