[ZODB-Dev] RelStorage: Which tables to replicate?

Shane Hathaway shane at hathawaymix.org
Tue May 20 12:36:04 EDT 2008


Stefan H. Holek wrote:
> I am playing with database replication (MySQL) and have found the  
> following caveats:
> 
> 	- don't mix engine types (MyISAM, InnoDB)
> 	- don't use temporary tables
> 
> Now, RelStorage does both and so I was wondering how to proceed with  
> replication. Would it be prudent to assume that all I ever need to  
> replicate are the InnoDB tables "transaction", "object_state", and  
> "current_object"? All other tables don't seem to be used across  
> transaction boundaries, but I may be missing something here.

That is mostly correct.  You need to replicate transaction, 
object_state, current_object, and do something with new_oid.  There is 
no requirement to replicate the other tables, since they are used only 
for packing, although replicating object_ref and object_refs_added may 
save some work.

The new_oid table is special to the MySQL adapter.  RelStorage uses the 
new_oid table as a kind of sequence.  Like any sequence, it is 
intentionally non-transactional.  Perhaps there would be no ill effects 
in switching it to the InnoDB engine.

Which MySQL replication method are you looking into?

Shane



More information about the ZODB-Dev mailing list