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:
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