Schema Summary Comparison Tool
(c) 2022-2023 SQLEXEC LLC
GNU V3 and MIT licenses are conveyed accordingly.
Bugs can be reported @ michaeldba@sqlexec.com
pg_match.py -t simplescan --Shost localhost --Sport 5414 --Suser postgres --Sdb clone_testing --Sschema sample --Thost localhost --Tport 5414 --Tuser postgres --Tdb clone_testing --Tschema clone1
Regarding the scantype parameter (-t or --scantype), SimpleScan uses row estimates (pg_class/pg_stat_user_tables) whereas DetailedScan uses actual row count SQL. So for SimpleScan you should analyze all your schema tables beforehand or you will get a lot of differences.
-t --scantype
SimpleScan or DetailedScan
-H --Shost
Source host
-P --Sport
Source port
-U --Suser
Source DB user
-D --Sdb
Source databae
-S --Sschema
Source schema
-h --Thost
Target host
-p --Tport
Target port
-u --Tuser
Target DB user
-d --Tdb
Target databae
-s --Tschema
Target schema
-r --ignore_rowcounts
Bypass row count check
-i --ignore_indexes
Bypass index check
-f --ignore_funcs
Bypass function/procedure check
-l --log
log diffs to specified output file
-v --verbose
verbose output (useful for debugging)
-x --print_help
print help message for program
- python 2.7 or above
- python packages: psycopg2
- Works on Linux and Windows.
- PostgreSQL versions 10+
Currently works for the following objects:
- tables
- views
- columns
- indexes and constraints
- functions and procedures
- row counts (implicit and direct)