hannu at skype.net hannu
Wed Nov 3 20:59:12 PST 2004
> On 11/2/2004 10:07 AM, Andrew Sullivan wrote:
>> On Mon, Nov 01, 2004 at 04:35:00PM -0500, Dave Chapeskie wrote:
>>>
>>> Basically I would like the ability for a large replicated table to
>>> have distributed origins where each row has a specific origin which is
>>> allowed to modify the row and propagates changes to all slaves.  Each
>>> row only needs to have a single origin/master however (i.e. I don't
>>> need
>>> full multi-master support).
>>>
>>> I'm hoping some of the developers can comment on
>>>
>>> (a) How difficult would it be for me to add this to SlonyI?  Is it even
>>>     feasible?
>>
>> Sure.  I know Joe Conway does something like this with dbmirror.
>> But. . .
>>
>>> (b) If I were to produce a patch that implements this would it be
>>>     considered for inclusion into SlonyI at all or do you intend to
>>>     restrict these types of features to SlonyII.
>>
>> . . .what you're talking about is not multi-master.  Multi-master is
>> intended to be a full-blown cluster, write-in-any-db,
>> see-it-everywhere system.
>>
>
> And he clearly said he doesn't need full MM.
>
> Anyhow, it would require to combine the log and the "deny update on
> subscriber" triggers into one, that then checks on call if the row
> called for is a local row or not. It also requires fundamental changes
> in the rest of the logic, like the way ENABLE_SUBSCRIPTION travels with
> respect to cascading. Or how to deal with MOVE_SET. It will not be a
> small change.

perhaps an easier way would be to create inherited tables and then
distribute the origins for them

i.e.

CREATE TABLE FULL_TABLE(i int);
CREATE TABLE SUB_TABLE_ORIGIN_1() INHERITS (FULL_TABLE);
CREATE TABLE SUB_TABLE_ORIGIN_2() INHERITS (FULL_TABLE);
CREATE TABLE SUB_TABLE_ORIGIN_3() INHERITS (FULL_TABLE);

and then insert only in subtables and set up the subscriptions for
different SUB_TABLE_% tables form corresponding origins.

One can still do "SELECT X FROM FULL_TABLE WHERE Y" at each node, but
updates/deletes mus be done at the right node.

One could also set up an INSERT rule on FULL_TABLE so that each insert
goes automatically to the riht table on each node.

-----
Hannu




More information about the Slony1-general mailing list