Tim,

Yes, in my first message I said that running the `update-sequences.sql`
script didn't help. :)

Not sure what happened to my install to make that not work!

Cheers,

On Thu, May 18, 2017 at 5:10 PM Tim Donohue <tdono...@duraspace.org> wrote:

> Hi Alan,
>
> No that should have no side effects. You are simply updating the database
> sequence that controls the next handle assignment.
>
> By the way, there's an easier way to fix these sorts of issues.  Simply
> run the provided `[dspace-src]/dspace/etc/postgres/update-sequences.sql`
> script that comes with DSpace. It'll take care of updating all your
> database sequences in the case of identifier conflicts.  Usually this is a
> rarely necessary, but it is more frequently needed after AIP
> restores/imports. It's also listed as a "Common Issue" in the AIP
> documentation:
> https://wiki.duraspace.org/display/DSDOC6x/AIP+Backup+and+Restore#AIPBackupandRestore-CommonIssuesorErrorMessages
>
> - Tim
>
> On Thu, May 18, 2017 at 2:10 AM Alan Orth <alan.o...@gmail.com> wrote:
>
>> 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.
>>
> --
>
> Tim Donohue
> Technical Lead for DSpace & DSpaceDirect
> DuraSpace.org | DSpace.org | DSpaceDirect.org
>
> --
> 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.
>
-- 
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