Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> comp.databases.theory -> Re: replication via tuple streams

Re: replication via tuple streams

From: paul c <>
Date: Wed, 28 Mar 2007 22:52:01 GMT
Message-ID: <lkCOh.84937$zU1.37511@pd7urf1no>

Marshall wrote:
> It seems like there are two ways to implement database
> replication in a master/slave configuration: replicating
> DML or replicating insert/delete tuple streams.
> (I will speak of the single table case without considering
> schema changes.)
> We have database master and slave, and table A in each.
> In the replicate-DML case, any DML statement (insert,
> update, delete) issued to master.A is replicated to
> slave.A and applied. This sounds very tidy, in that the
> DML statement itself is likely to be quite compact.
> However there is a limitation. Consider table master.B
> that is not replicated, and a statement like:
> insert into A select * from B
> When that statement arrives at the slave, it won't
> be able to execute it because it doesn't have table B.
> So this approach more or less requires replication for
> the transitive closure of the set of tables you want +
> the set of tables that might get mentioned in DML.
> In another approach, we replicate instead the tuple
> streams. Imperative statements may cause some tuples
> to be deleted, or some to be inserted, or some to be
> deleted then some to be inserted (update.) The lack
> of table B in the above query is no difficulty, because
> the actual tuples in the subselect are transmitted,
> which is exactly what needs to be inserted to slave.A.
> ...

Not sure why you mention closure, but the above reminds me that I've long thought replication and concurrency are just two sides of the same coin. Also think that much of the concurrency theory involves shell games or other trickery to make it hard for people to understand just what the problem is. Always seemed to me that replication must replicate all and everything unless some method is present to stop replication. Same goes for concurrency - when the "serialization" mode is entered, all previous queries need to be either re-iterated or their results guaranteed. For me, the key word in the latter two sentences is "all".

p Received on Wed Mar 28 2007 - 17:52:01 CDT

Original text of this message