| Ian Burrell 2005-06-27, 8:24 pm |
| We just ran into a problem with Slony1 1.1.0 corrupting strings with
UTF-8 characters. We are using Slony1 1.1.0, PostgreSQL 7.4.6 on RHEL
2.1AS and RHEL 3. The
This shows up as an error on the slave node when SYNC a set.
ERROR: duplicate key violates unique constraint "unq_reported_titles"
The problem inserts are:
insert into "public"."reported_titles" =20
(reported_title_no,p
rovider_id,title_id,
title_name,title_no,
date_created,ms=
o_no)
values ('204007','VIDEOROLA
','20900','V 1 | 4461204 | =20
39 | 8592505 | I |
(reported_title_no,p
rovider_id,title_id,
title_name,title_no,
date_created,ms=
o_no)
values ('204007','VIDEOROLA
','20900','VideoRola
Opci=F3n
','191248','2005-06-27 13:29:09','1')
1 | 4461204 | 39 | 8592507 | I |
(reported_title_no,p
rovider_id,title_id,
title_name,title_no,
date_created,ms=
o_no)
values ('204008','VIDEOROLA
','20900','VideoRola
Opci=F3n
','191249','2005-06-27 13:29:09','1')ideoRo
la Opci=F3n
','191248','2005-06-27 13:29:09','1');
insert into "public"."reported_titles"
(reported_title_no,p
rovider_id,title_id,
title_name,title_no,
date_created,ms=
o_no)
values ('204008','VIDEOROLA
','20900','VideoRola
Opci=F3n
','191249','2005-06-27 13:29:09','1');
The unique key is on the provider_id, title_id, title_name. However,
this is not what the data looks like in the master database:
reported_title_no | provider_id | title_id | title_name |
title_no | provider_no | date_created | created_by_user_no |
mso_no
-------------------+-------------+----------+--------------------+---------=
-+-------------+---------------------+--------------------+--------
204007 | VIDEOROLA | 20900 | VideoRola Opci=F3n 4 | =20
191248 | | 2005-06-27 13:29:09 | | 1
204008 | VIDEOROLA | 20900 | VideoRola Opci=F3n 5 | =20
191249 | | 2005-06-27 13:29:09 | | 1
The problem seems to be in sl_log_1 table on the master:
1 | 4461204 | 39 | 8592505 | I |
(reported_title_no,p
rovider_id,title_id,
title_name,title_no,
date_created,ms=
o_no)
values ('204007','VIDEOROLA
','20900','VideoRola
Opci=F3n
','191248','2005-06-27 13:29:09','1')
1 | 4461204 | 39 | 8592507 | I |
(reported_title_no,p
rovider_id,title_id,
title_name,title_no,
date_created,ms=
o_no)
values ('204008','VIDEOROLA
','20900','VideoRola
Opci=F3n
','191249','2005-06-27 13:29:09','1')
My guess is that the trigger inserting sl_log_1 is getting confused
about the length of the string.
- Ian
|