pg_chameleon v2.0.0.alpha2 is out
Has been a while since I wrote a post on this blog.
I’ve been quite busy on coding pgchameleon’s version 2.
I finally managed to release an alpha1 the 11th of November but this release had several issues which prevented the users to have real tests.
However, after a week of debugging I’ve released pg_chameleon v2.0.0.alpha2 which is now quite usable.
For a complete command line reference and an usage example click here.
The documentation now have a dedicated a page with the configuration file details explained.
Please note this pre-release and despite the changelog shows many
fixes, there is
still a lot of work to do.
Do not use it in production.
So, why pgchameleon v2 and why the version 1 can’t be fixed?
Well, pg_chameleon started as an experiment and the version 1 was built without any clue on the architecture and what should be the final result.
This caused the version 1 to have several issues making very difficult to improve it without dismantling the existing logic.
Building up from fresh start required less time to reorganise the
original in the correct way.
The code now is more modular, but is still not very pythonic.
My bad, I’m not a developer after all.
The major changes from the version 1 are the following.
- Python 3 only development
- Supports the replica from multiple MySQL schemas withing a single MySQL instance. The source’s and target schema names can be different.
- Conservative approach to the replica. Tables which generate errors are automatically excluded from the replica.
- Daemonised init_replica process.
- Daemonised replica process with two separated subprocess, one for the read and one for the replay.
- Soft replica initialisation. The tables are locked when needed and stored with their log coordinates. The replica daemons will put the database in a consistent status gradually.
- Rollbar integration for a simpler error detection.
The version 2 improves the display of the
show_status command when
a source name is specified.
There is also an error log in the replica schema which saves the exception’s data during the replay phase.
The error log can be queried with the new command
To install the version 2 please run.
python3 -m venv venv source venv/bin/activate pip install pip --upgrade
pip install pg_chameleon==2.0.0a2
Please report any issue on github.