Hi,
a few days ago I update drupal from version 6.20 to 7.0. Everything was OK but on one site (I have 3 sites - one was only installed and 2 are used) update #7061 fails with this error:

Failed: PDOException: SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block: SELECT 1 AS expression FROM {file_managed} file_managed WHERE ( (fid = :db_condition_placeholder_0) ) FOR UPDATE; Array ( [:db_condition_placeholder_0] => 45 ) in system_update_7061() (line 2808 of /mnt/web/www/drupal/modules/system/system.install).

Now I tried update to 7.2 but this problem is still here. I'm using postgresql 9.0.1 and php version 5.2.17.

Comments

yurtboy’s picture

So I ran into the same issue. Out of 1000 files 25 "duplicates" existed.
So I ran a query on the upload table to find those duplicates and deleted them.
here was my query

SELECT u.* FROM upload u
INNER JOIN upload u2 on LOWER(u.description) LIKE LOWER(u2.description) AND u.fid != u2.fid
GROUP BY u.description

Then I deleted the system_update_7061 table and truncated the file_managed table to run update.php again.
This would not be needed but since the update ran into an issue it left these tables behind.

Then it worked minus the 25 files.

Not ideal. One other idea was to query the 25, rename them via a UPDATE query by adding say the word TEMP to the end of them so now they are "unique". Then do as I did above. Once all of that is done I could have gone into file_manage and do another query to remove that suffix TEMP.