Fri May 13 16:25:29 PDT 2005
- Previous message: [Slony1-general] Duplicate Key violation question...
- Next message: [Slony1-general] Duplicate Key violation question...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Christopher, We do have 2 tables domains and records, the key on both is named ID. I would imagine that using the fully qualified naem would be public.domains and public.records. It'll find the key? Or am I assuming here? Thanks, Thomas *********** -----Original Message----- From: Christopher Browne [mailto:cbbrowne at ca.afilias.info] Sent: Friday, May 13, 2005 11:17 AM To: Thomas Go Cc: slony1-general at gborg.postgresql.org Subject: Re: [Slony1-general] Duplicate Key violation question... Thomas Go wrote: > > I thought I had set this up properly when I created the cluster...but > I'm getting the following mesg. > > dns_data=# INSERT INTO domains (name, type) VALUES ('5th.kz', > 'NATIVE'); > ERROR: duplicate key violates unique constraint "domains_pkey" > > We have 2 table something call dom and rec. I have set this under the > create set > > create set (id=1, origin=1, comment=''); > set add table (set id=1, origin=1, id=1, fully qualified name = > 'public.dom', comment='domain table'); set add table (set id=1, > origin=1, id=2, fully qualified name = 'public.rec', comment='records > table'); > > But I'm still getting the key violates. I would insert it a few time > and then it'll go through. Any thoughts? > Could you show the schema for the table domains? (I can probably make a more-than-merely-educated guess, but I'll ask :-)) I'll bet the primary key is on an ID field, more than likely called domain_id, populated by a sequence. That sequence needs to be replicated, and I'll bet it isn't. This would be particularly likely to occur if you do a MOVE SET, which then means the table on the _new_ origin has the sequence value reset to a too-low value so that it will periodically conflict with existing domain_id values. Deleted domains would leave gaps, with the result that the failures would be sporadic. Replicate the sequence and the "Slony-I partly to blame" part goes away. It is also possible that the sequence was just plain wrongly set, in which case it's not a Slony-I issue at all. (That has happened to me once or twice...)
- Previous message: [Slony1-general] Duplicate Key violation question...
- Next message: [Slony1-general] Duplicate Key violation question...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list