Thread: contrib/dbmirror conditional replication

contrib/dbmirror conditional replication

From
Steven Singer
Date:

Attatched is a proposed patch to dbmirror that adds conditional replication.
The patch was submitted by Achilleus Mantzios <achill@matrix.gatewaynet.com>
and merged into the HEAD(plus some other minor changes) by myself.

I'm looking for some feedback on if we should apply this patch or not.

It works by maintaning a list of table names and columns within those tables
that should be conditionally sent to slaves based on the value of the column
specified.   For each row the value of the column specifid must match the
value of the slaves MirrorHostId in the MirrorHost table. (That's one of the
things I'm not a big fan of)

The other big feature of the patch is that it allows some tables involved in
foreign key relationships to only have the rows mirrored that are required
on a particular slave because of they are referenced by the foreign key of a
row conditionally to only 1 of the slaves.

The upside of the patch is that it allows for the minimal amount of
information to be trasnmitted to slave systems(usefull if communication
costs are very high)

Downsides include that the code is kind of complicated, insert,updates and
deletes are much slower and a lot of extra information needs to be stored by
the mirroring system(see the accounting table).

I added a compile time flag to enable or disable this feature.

I think there's demand for conditional replication(because I've had other
requests for it) I'm just wondering if this is a good starting point?






Attachment

Re: contrib/dbmirror conditional replication

From
Joe Conway
Date:
Steven Singer wrote:
> Downsides include that the code is kind of complicated, insert,updates and
> deletes are much slower and a lot of extra information needs to be stored by
> the mirroring system(see the accounting table).

I second this part.

> I added a compile time flag to enable or disable this feature.
>
> I think there's demand for conditional replication(because I've had other
> requests for it) I'm just wondering if this is a good starting point?

I need conditional replication, but personally I'm not fond of the
depends-on row chaining stuff. And I think there are simpler ways to get
the conditional replication, but unfortunately I haven't had time to
work on proving that yet, so I could be wrong ;-)

I don't think you'll get much feedback from dbmirror users on PATCHES --
it might be a good idea to solicit input on GENERAL or maybe the gborg
replication list.

Joe