Last updated: 2020-02-28

The makedelta process is used by Bucardo to add entries to the bucardo_delta table and the bucardo_track table as replication is happening. This is needed if the updates made by a sync need to be read at a later time by a different sync. For example, if you had a pushdelta sync “alpha” replicating rows from database A to database B, and another pushdelta sync replicating rows from database B to database C, you would need to turn on makedelta for sync “alpha”, so that the rows copied from A to B are able to be picked up as changed rows for the B to C sync.

There are four columns that control the use of makedelta:

  • goat.target_makedelta. Controls if a specific table should insert makedelta entries on the target. This can be null, in which case the value of whatever sync it is in is used, 0 to not do makedelta, and 1 to always do makedelta.
  • goat.source_makedelta. Same as above, but for the source database. This is only used by swap syncs.
  • sync.target_makedelta. Controls if this sync should insert makedelta entries or not for each of the tables within that sync. If this is set to 1, all tables will have makedelta enabled, regardless of the goat.target_makedelta setting. If this is set to 0, then makedelta will not be enabled (again, the goat.target_makedelta setting is ignored). However, if sync.target_makedelta is set to NULL, then any goats set as target_makedelta will be run as makedelta (and only those goats).
  • sync.source_makedelta. Same as above, but for the source database. This is only used by swap syncs.

swap syncs require both source and target makedelta settings, at either the goat or sync level.

The easiest way to enable makedelta is to simply set it as needed at the sync level. In the example above, you would do:

bucardo update sync alpha target_makedelta=1

However, if you have many syncs using the same tables, it’s easiest to leave the sync level as null, and update the tables:

bucardo update table <table1> target_makedelta=1

Bucardo.org is hosted and supported by End Point Dev

End Point Dev logo

Need assistance with Bucardo?

End Point Dev offers professional support for Bucardo, as well as specializing in developing, designing, and marketing effective websites. Since 1995, our diverse team of developers has shown that End Point can handle your organization’s greatest web and database challenges.