Pg_chameleon is a replication tool from MySQL to PostgreSQL developed in Python 2.7 and Python 3.3+
The system relies on the mysql-replication library to pull the changes from MySQL and covert them into a jsonb object.
A plpgsql function decodes the jsonb and replays the changes into the PostgreSQL database.
The tool requires an initial replica setup which pulls the data from MySQL in read only mode.
This is done by the tool running FLUSH TABLE WITH READ LOCK; .
The tool can pull the data from a cascading replica when the MySQL slave is configured with log-slave-updates.
Changelog from 1.0 Beta 2
- add support for primay key defined as column constraint
- fix regression if null constraint is omitted in a primary key column
- add foreign key generation to detach replica. keys are added invalid and a validation attempt is performed.
- add support for truncate table
- add parameter out_dir to set the output destination for the csv files during init_replica
- add set tables_only to table_limit when streaming the mysql replica
- force a close batch on rotate event if binlog changes without any row events collected
- fixed replica regression with python 3.x and empty binary data
- added event_update in hexlify strategy
- add tabulate for nice display for sources/status
- logs are rotated on a daily basis
- removed parameter log_append
- add parameter log_days_keep to specify how many days keep the logs
- feature freeze