Hi,

I'm trying to replicate a postgresql database 8.3 with 1TB data and about
20.000 tables using slony 2.2.3 but I'm getting the following error in the
middle of the process:

I created a main set with id number 1 and then small temporary sets were
created and merged to the main set.

Currently there are about 15.000 tables being replicated in the main set
and when I was adding another small set I got this error during the MERGE
command:

2014-12-16 07:08:25 BRST CONFIG remoteWorkerThread_1: Begin COPY of table
"8357_isarq"."wm_bco_pla"
NOTICE:  truncate of "8357_isarq"."wm_bco_pla" succeeded
2014-12-16 07:08:25 BRST CONFIG remoteWorkerThread_1: 74168 bytes copied
for table "8357_isarq"."wm_bco_pla"
NOTICE:  Slony-I: Logswitch to sl_log_1 initiated
CONTEXT:  SQL statement "SELECT "_slcluster".logswitch_start()"
PL/pgSQL function cleanupevent(interval) line 97 at PERFORM
2014-12-16 07:08:25 BRST INFO   cleanupThread:   89.011 seconds for
cleanupEvent()
2014-12-16 07:08:25 BRST ERROR  remoteWorkerThread_1: "select
"_slcluster".finishTableAfterCopy(15564); analyze
"8357_isarq"."wm_bco_pla"; " PGRES_FATAL_ERROR ERROR:  could not create
unique index "pk_wm_bco_pla"
DETAIL:  Key (bco_cod, pla_cod)=(399, 5056110) is duplicated.
CONTEXT:  SQL statement "reindex table "8357_isarq"."wm_bco_pla""
PL/pgSQL function finishtableaftercopy(integer) line 26 at EXECUTE statement
2014-12-16 07:08:25 BRST WARN   remoteWorkerThread_1: data copy for set 999
failed 108 times - sleep 60 seconds

The error indicates "8357_isarq"."wm_bco_pla" has duplicated rows for
primary key  (bco_cod, pla_cod)=(399, 5056110) but when I query the table
using this pk I got only one row:

select * from "8357_isarq"."wm_bco_pla" where bco_cod=399 and pla_cod =
'5056110';
 bco_cod | pla_cod |                pla_des                | ativo |
conta_pai | pla_itlistserv | pla_ctacosif
---------+---------+---------------------------------------+-------+-----------+----------------+--------------
     399 | 5056110 | RENDAS TRANSACOES VISA ELETRON - HBBR | S     |
5056004   |           1501 | 71799003
(1 row)

Slony is trying to merge the temporary set to the main set every 60 seconds
and getting this error. I do not want to loose three days of replication
processing.

Is there anything I can do to fix this error or at least can I remove this
table from the temporary set and work on this issue afterwards?

Thank you!
_______________________________________________
Slony1-general mailing list
Slony1-general@lists.slony.info
http://lists.slony.info/mailman/listinfo/slony1-general

Reply via email to