Update, it looks like I can get the latest handle sequence using this query:

dspace=# select * from handle where handle_id=(select max(handle_id) from
handle);

And then update the handle_seq manually using:

dspace=# select setval('handle_seq',86873);

After this I am able to create collections again. I'm not sure if this
method has side effects? DSpace 5.5 with PostgreSQL.

Cheers,

On Thu, May 18, 2017 at 1:25 AM Alan Orth <alan.o...@gmail.com> wrote:

> Hello,
>
> I am testing an AIP import to my test DSpace 5.5 instance and everything
> goes fine (other than Java JVM issues!), but now when I try to create a
> new, unrelated collection, I get the following error:
>
> ERROR: duplicate key value violates unique constraint "handle_pkey"
> Detail: Key (handle_id)=(84834) already exists.
>
> I have run the update-sequences.sql script and I notice that the last
> value it sets is 84833, so I'm curious why an item with this handle_id
> could actually exist. If I find its handle, it does in deed exist:
>
> dspace=# select * from handle where handle_id=84834;
>  handle_id |   handle   | resource_type_id | resource_id
> -----------+------------+------------------+-------------
>      84834 | 10947/1332 |                2 |       87113
> (1 row)
>
> Can I just find the max handle_id that exists and increment the handle_seq
> to that somehow?
>
> Thank you,
>
>
>
> --
> Alan Orth
> alan.o...@gmail.com
> https://picturingjordan.com
> https://englishbulgaria.net
> https://mjanja.ch
>
-- 
Alan Orth
alan.o...@gmail.com
https://picturingjordan.com
https://englishbulgaria.net
https://mjanja.ch

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to