<div dir="ltr"><div><div><div><div><div><div>Hi, <br><br></div>I have configured Slony-II using altperl tools. I am trying to add a new table to a running replication using following steps:<br><br>1.<br> ./slonik_execute_script --config slon_tools.conf 1 /usr/pgsql-9.2/bin/test.sql | ./slonik (sql file has only create table command)<br>
<stdin>:4: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "ddl_slony_pkey" for table "ddl_slony"<br><br>2.<br></div>Adding the table in the slon_tools.conf file as set2 below set1:<br>
<br> "set2" => {<br> "set_id" => 2,<br> "table_id" => 2,<br> "sequence_id" => 2,<br> "pkeyedtables" => ["public.ddl_slony"],<br>
"keyedtables" => {},<br> "sequences" => [],<br> },<br><br>3. While executing create set, I am getting the following error:<br><br> ./slonik_create_set -c slon_tools.conf 2 | ./slonik<br>
<br><stdin>:11: Subscription set 2 created<br><stdin>:12: Adding tables to the subscription set<br><stdin>:13: PGRES_FATAL_ERROR lock table "_ms_prod_slony".sl_config_lock;select "_ms_prod_slony".setAddTable(2, 2, 'public.ddl_slony', 'ddl_slony_pkey', 'Table public.ddl_slony with primary key'); - ERROR: Slony-I: setAddTable_int: table id 2 has already been assigned!<br>
CONTEXT: SQL statement "SELECT "_ms_prod_slony".setAddTable_int(p_set_id, p_tab_id, p_fqname,<br> p_tab_idxname, p_tab_comment)"<br>PL/pgSQL function _ms_prod_slony.setaddtable(integer,integer,text,name,text) line 28 at PERFORM<br>
<br></div>I tried the above by manually creating another table on both nodes and adding and creating set as set3. Still facing the same issue.<br><br></div>Can anybody point out where I am going wrong and how it should be fixed?<br>
<br></div>Thanks,<br></div>GB<br><div><div><div><div><br><br><br></div></div></div></div></div>