[rt-users] DBD::Pg::st execute failed: ERROR: duplicate key value violates unique constraint "articles_pkey" at [...]/DBIx/SearchBuilder/Handle.pm

Lee Damon nomad at ee.washington.edu
Tue Sep 30 11:13:26 EDT 2014


On 9/30/14, 00:09 , Joop wrote:
> I wonder if you create a new article in the old instance if you then get
> the same error.

I can create a new article in the old instance without error. The test
article was #242.

> I suspect that the sequence that populates the primary key of the
> articles tables is lower than the latest article. One work around is to
> set the sequence to the highest id+1 of the article table
> Fire up your favourite postgres client and connect with your rt_admin to
> your rt instance, do 'select max(id) from articles;' this should give a
> number and then do 'select last_value from articles_id_seq;' this number
> should equal the previous one but I suspect that the last one will be
> lower than the first.

Those came up respectively as 241 (which I'd expect) and 3 (hmm).

thanks,
nomad



More information about the rt-users mailing list