contrib/dbmirror conditional replication - Mailing list pgsql-patches

From Steven Singer
Subject contrib/dbmirror conditional replication
Date
Msg-id Pine.LNX.4.33.0311161726100.2090-400000@pcNavYkfAdm1.ykf.navtechinc.com
Whole thread Raw
Responses Re: contrib/dbmirror conditional replication
List pgsql-patches

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

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [pgsql-hackers-win32] SRA Win32 sync() code
Next
From: Tom Lane
Date:
Subject: Re: [pgsql-hackers-win32] SRA Win32 sync() code