Hi Mark,

your answer was very helpful. I have about 35 records of this type. I have 
a lot of work ahead of me. Thank you very much.

I will add that my repository is after updating from DSpace 5.5. I have no 
way to check now whether the problem was still in the old database or was 
created only in DSpace 7. So it cannot definitely be connected with the 
potential problems of the new version.

Regards,
Mariusz
wtorek, 13 czerwca 2023 o 14:42:01 UTC+2 Mark H. Wood napisaƂ(a):

> On Mon, Jun 12, 2023 at 10:58:26PM -0700, Technologiczny Informator wrote:
> > I reported this problem at the end of December last year, but no one 
> > responded. That's why I'm writing again, because the problem has not 
> > disappeared after updating to DSpace 7.5.
> > Not only that ... I had the opportunity to update to version 7.5 on a 
> > completely different database than mine. Her assetstore folder is over 
> 170 
> > GB. The owner of this DSpace wanted to split the database into two 
> separate 
> > instances. This is what happened and in each of them a large number of 
> > items had to be removed (over 24,000 in one of them). After this 
> operation, 
> > I wanted to clean the database with the cleanup option, but the effect 
> so 
> > far - I only post the error message this time::
> > 
> > Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on 
> > table "bitstream" violates foreign key constraint 
> > "bundle_primary_bitstream_id_fkey" on table "bundle"
> > Detail: Key (uuid)=(02caead4-de93-4011-8105-0e6921f286d8) is still 
> > referenced from table "bundle".
>
> I get those sometimes. Here are the notes that I made for myself
> about manually resolving the situation:
>
> DSpace 6+:
>
> \set a BITSTREAM-UUID
> SELECT uuid AS b FROM bundle WHERE primary_bitstream_id = :'a';
> \gset
> SELECT * FROM bundle2bitstream WHERE bundle_id = :'b';
>
> -- Is bitstream A in bundle B? Yes: problem?
>
> SELECT deleted FROM bitstream WHERE uuid = :'a';
>
> -- Deleted? No: problem?
>
> UPDATE bundle SET primary_bitstream_id = null WHERE uuid = :'b';
>
> where BITSTREAM-UUID is replaced by the actual UUID. I type the first
> '\set' in by hand and paste the UUID; after that I just copy/paste
> each command and watch for errors, including those noted in the
> comments. This procedure isn't *quite* right yet to be scripted, but
> it works for me.
>
> I sometimes find that there are multiple bitstreams with this problem.
> Unfortunately, the cleanup tool exits after the first one (aborting
> its single transaction, alas!), so sometimes I need to run cleanup
> several times, fixing one bitstream at a time.
>
> -- 
> Mark H. Wood
> Lead Technology Analyst
>
> University Library
> Indiana University - Purdue University Indianapolis
> 755 W. Michigan Street
> Indianapolis, IN 46202
> 317-274-0749 <(317)%20274-0749>
> www.ulib.iupui.edu
>

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/697ec354-4bbe-4712-b3c0-cac63d076734n%40googlegroups.com.

Reply via email to