25 March 2018
The maintenance release 2.0.5 a regression which prevented some tables to be synced with sync_tables
when the parameter limit_tables
was set.
Previously having two or more schemas mapped with only one schema listed in limit_tables
prevented the other schema’s tables to be synchronised with sync_tables
.
This release add two new commands to improve the general performance and the management.
The command stop_all_replicas
stops all the running sources within the target postgresql database.
The command run_maintenance
performs a VACUUM FULL on the specified source’s log tables.
In order to limit the impact on other sources eventually configured the command performs the following steps.
- The read and replay processes for the given source are paused
- The log tables are detached from the parent table
sch_chameleon.t_log_replica
with the commandNO INHERIT
- The log tables are vacuumed with
VACUUM FULL
- The log tables are attached to the parent table
sch_chameleon.t_log_replica
with the commandINHERIT
- The read and replay processes are resumed
Currently the process is manual but it will become eventually automated if it’s proven to be sufficiently robust.
The pause for the replica processes creates the infrastructure necessary to have a self healing replica. This functionality will appear in future releases of the branch 2.0.
As this change requires a replica catalogue upgrade is very important to follow the upgrade instructions provided below.
- If working via ssh is suggested to open a screen session
- Before the upgrade stop all the replica processes.
- Upgrade pg_chameleon with
pip install pg_chameleon --upgrade
- Run the upgrade command
chameleon upgrade_replica_schema --config <your_config>
- Start the replica processes
Changelog from v2.0.4
- fix wrong exclusion when running sync_tables with limit_tables set
- add
run_maintenance
command to perform a VACUUM FULL on the source’s log tables - add
stop_all_replicas
command to stop all the running sources within the target postgresql database