contrib/dbmirror conditional replication

From: Steven Singer <ssinger(at)navtechinc(dot)com>
To: <pgsql-patches(at)postgresql(dot)org>
Cc: <achill(at)matrix(dot)gatewaynet(dot)com>
Subject: contrib/dbmirror conditional replication
Date: 2003-11-16 17:28:01
Message-ID: Pine.LNX.4.33.0311161726100.2090-400000@pcNavYkfAdm1.ykf.navtechinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Attatched is a proposed patch to dbmirror that adds conditional replication.
The patch was submitted by Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)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 Content-Type Size
filter_patch1.txt text/plain 57.1 KB
MirrorSetupAddon.sql text/plain 465 bytes
FilterReadme.txt text/plain 1.7 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Kurt Roeckx 2003-11-16 17:28:06 Re: SIGPIPE handling
Previous Message Andrew Dunstan 2003-11-16 17:22:38 Re: improve overcommit docs