Richard Yen dba at richyen.com
Sun Aug 9 23:40:20 PDT 2009
Is it possible that you have the table defined twice in your build  
script?

Or if you are trying to add this table to an existing replication set,  
perhaps it is already added?  Run the following query to find out:  
"select * from _repcluster.sl_table where relname = 't_i_shift_shadow';"

--Richard


On Aug 9, 2009, at 10:56 PM, Sweta Mulgavker wrote:

> Hello all,
>
> I have a table named "t_i_shift_shadow"  with following spec
>
>
>     Column      |         Type          |
> Modifiers
> -----------------+----------------------- 
> +-------------------------------------------------------------------
>  cid             | character varying(20) | not null
>  shift_rev_id    | character varying(20) | not null
>  start_time      | bigint                | not null
>  end_time        | bigint                | not null
>  lunch_from_time | bigint                | default -1
>  lunch_to_time   | bigint                | default -1
>  shift_date      | date                  | not null
>  is_cyclic       | integer               | not null
>  serial          | integer               | not null default
> nextval('t_i_shift_shadow_serial_seq'::regclass)
> Indexes:
>    "t_i_shift_shadow_pkey" PRIMARY KEY, btree (serial)
> Triggers:
>    _replcluster_logtrigger_4 AFTER INSERT OR DELETE OR UPDATE ON
> t_i_shift_shadow FOR EACH ROW EXECUTE PROCEDURE
> _replcluster.logtrigger('_replcluster', '4', 'vvvvvvvvk')
>
>
> I am trying to replicate this table using slony.
>
> But I get the following error...
>
> ERROR -->
>
>   replconfig.cnf:85: PGRES_FATAL_ERROR select  
> "_replcluster".setAddTable(8, 36, 'public.t_i_shift_shadow',  
> 't_i_shift_shadow_pkey', 'shift shadow table');  - ERROR:  duplicate  
> key violates unique constraint "sl_table_tab_reloid_key"
>
> CONTEXT:  SQL statement "insert into "_replcluster".sl_table  
> (tab_id, tab_reloid, tab_relname, tab_nspname, tab_set, tab_idxname,  
> tab_altered, tab_comment) values ( $1 ,  $2 ,  $3 ,  $4 ,  $5 ,   
> $6 , false,  $7 )"
>
> PL/pgSQL function "setaddtable_int" line 103 at SQL statement
> SQL statement "SELECT  "_replcluster".setAddTable_int( $1 ,  $2 ,   
> $3 ,  $4 ,  $5 )"
> PL/pgSQL function "setaddtable" line 37 at perform
>
>
> Can somebody please help me out :(
>
> Thanks and Regards,
> Sweta.
>
>
>
>
>
>
> _______________________________________________
> Slony1-general mailing list
> Slony1-general at lists.slony.info
> http://lists.slony.info/mailman/listinfo/slony1-general



More information about the Slony1-general mailing list