[sqlite] Multi-master replication through UPDATE and INSERT logging?

2009-09-17 Thread Kelly Jones
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. I looked at the sqlite3Insert() function in sqlite3.c, but couldn't find a variable that holds the query

Re: [sqlite] Multi-master replication through UPDATE and INSERT logging?

2009-09-17 Thread Simon Slavin
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

Re: [sqlite] Multi-master replication through UPDATE and INSERT logging?

2009-09-17 Thread Simon Slavin
On 17 Sep 2009, at 5:29pm, Simon Slavin wrote: [stuff] Sorry, I forgot to add: you are asking questions about a subject which is frequently raised here: synchronising multiple copies of a database. This stuff is hard. There is no obvious solution, and there are some very unobvious

Re: [sqlite] Multi-master replication through UPDATE and INSERT logging?

2009-09-17 Thread Andreas Kupries
Simon Slavin wrote: On 17 Sep 2009, at 5:29pm, Simon Slavin wrote: [stuff] Sorry, I forgot to add: you are asking questions about a subject which is frequently raised here: synchronising multiple copies of a database. This stuff is hard. Note also http://www.sqliteconcepts.org

Re: [sqlite] Multi-master replication through UPDATE and INSERT logging?

2009-09-17 Thread Kelly Jones
On 9/17/09, Simon Slavin slav...@hearsay.demon.co.uk wrote: 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.

Re: [sqlite] Multi-master replication through UPDATE and INSERT logging?

2009-09-17 Thread Stephan Wehner
On Thu, Sep 17, 2009 at 9:56 AM, Kelly Jones kelly.terry.jo...@gmail.com wrote: On 9/17/09, Simon Slavin slav...@hearsay.demon.co.uk wrote: 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

Re: [sqlite] Multi-master replication through UPDATE and INSERT logging?

2009-09-17 Thread Jean-Christophe Deschamps
At 18:56 17/09/2009, you wrote: ´¯¯¯ % 99+% of the time, there won't be two updates at the same time. In other words, copy 1's change will almost always propagate to copy 2 before copy 2 does another update. `--- The devil is in the 1% and the almost of course. But what do you and other

Re: [sqlite] Multi-master replication through UPDATE and INSERT logging?

2009-09-17 Thread Simon Slavin
On 17 Sep 2009, at 5:56pm, Kelly Jones wrote: % 99+% of the time, there won't be two updates at the same time. In other words, copy 1's change will almost always propagate to copy 2 before copy 2 does another update. Doesn't really matter as long as you have the other 1% of the time. % In