Hi!
I have the same error on cleanup. Trying to use this method to fix it.
But I receive 2 empty rows here instead of some uuids


*\set a 15b3ebc4-ae05-461e-ab9d-3a39bdb1bb50 dspace=# SELECT item_id AS b 
FROM requestitem WHERE bitstream_id = :'a';*b
- - -


(2 rows)

This looks OK though
*dspace=# SELECT deleted FROM bitstream WHERE uuid = :'a';*
deleted
---------
t
(1 row)

What do I do next?

Thanks,
Andrew
середу, 5 липня 2023 р. о 09:29:31 UTC+3 Technologiczny Informator пише:

> Hi,
>
> Mark was replying to my post then. While cleaning I had the same one case 
> as yours. Since you got to know Mark's method, I'm throwing you my 
> "procedure" without comment:
>
> *ERROR: update or delete on table "bitstream" violates foreign key 
> constraint "requestitem_bitstream_id_fkey" on table "requestitem"*
> *  Szczegóły: Key (uuid)=(e2f6374b-f2ff-435c-9940-f37adc6250aa) is still 
> referenced from table "requestitem".*
>
> *\set a e2f6374b-f2ff-435c-9940-f37adc6250aa*
> *SELECT item_id AS b FROM requestitem WHERE bitstream_id = :'a';*
>
> *b*
> *--------------------------------------*
> * db43aa8e-855d-42b9-b82c-57c3d469e4f7*
> db43aa8e-855d-42b9-b82c-57c3d469e4f7
> (2 rows)
>
> *SELECT deleted FROM bitstream WHERE uuid = :'a';*
> deleted
> ---------
> t
> (1 row)
>
> *\set b* *db43aa8e-855d-42b9-b82c-57c3d469e4f7*
> *UPDATE requestitem SET bitstream_id = null WHERE item_id = :'b';*
> UPDATE 2
>
> \q
>
> Regards,
> Mariusz
> poniedziałek, 3 lipca 2023 o 20:08:03 UTC+2 Wally Grotophorst napisał(a):
>
>> I saw the earlier posting on a problem with cleanup that stopped running 
>> with a message like this one:
>>
>>  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 have the same issue with 7.6 and the suggestions Mark Wood included in 
>> response on June 12 has been working for me.  Well, sort of.  I fixed 9 or 
>> 10 using Mark's method and then cleanup died with this error message:
>>
>> Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on 
>> table "bitstream" violates foreign key constraint 
>> "requestitem_bitstream_id_fkey" on table "requestitem"
>>
>>   Detail: Key (uuid)=(ca1a4a1e-5fd0-418e-96f6-6911475a8b2f) is still 
>> referenced from table "requestitem".
>>
>> Mark's suggestion does not work for this table but I wonder if someone 
>> else has encountered this issue and has the SQL that might fix it?  Thanks.
>>
>> - Wally Grotophorst
>> George Mason University
>>
>>
>>  
>>
>

-- 
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/1b2faa79-0b8b-4568-a5d0-d3ca4592d163n%40googlegroups.com.

Reply via email to