Ian Burrell ianburrell
Tue Aug 8 13:53:34 PDT 2006
On 8/8/06, Devrim GUNDUZ <devrim at commandprompt.com> wrote:
>
> Has anyone tried Slony-I on a partitioned table?
>

We just partitioned one of our replicated tables.  It seems to be
working fine.  One thing we did is pre-create the partitions for the
next six months because adding them to the replication automatically
would be a huge pain.  It was better to do it in batches every few
months.

> I'm working on some tests per a question from a local user. He says that
> he cannot add child tables to replication set, because child the table
> does not have primary keys. Because of DO INSTEAD, no data is inserted
> to master table, so there is no replication :(
>
> Any solution on this?
>

Add the primary key to the child tables.  The primary key constraint
is not inherited by the child tables.  Each child table needs its own
primary key index.

> I thought of adding a trivial serial column to each child table, which
> will act as a primary key;  so that I can add them into replication
> set.
>

We are using a sequenced column as primary key for that table.  It is
global across all the partitions (although the constraint can't
determine this).

 - Ian



More information about the Slony1-general mailing list