On 17 Sep 2009, at 4:54pm, Kelly Jones wrote: > I want to do multi-master sqlite3 replication by editing sqlite3.c to > log UPDATE/INSERT queries with timestamps, and then using another > program to run those queries on the other masters.
Doesn't work. Consider: You have a database with three records: ID object colour -- ------ ------ 1 car red 2 coat black 3 hat green In database copy number 1 someone does UPDATE objects SET colour='green' WHERE id=1 In database copy number 2 someone does UPDATE objects SET colour='purple' WHERE colour='green' Then you try to merge the databases by running everyone else's UPDATE commands against each copy. Under your system copy 1 will still end up different copy 2. A better way is to hold just one 'master' copy of the database centrally, use everyone's queries to update that, then distribute copies of the master. But even that won't have the results you might expect at first glance. First you need to work out what you'd want to happen under those circumstances. Then work out how to implement it. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users