Problems updating Sonar Enterprise from 8.1 to 8.9.X

Hello @xaviersojo ,

Before we proceed with further troubleshooting, please backup your database, copy it to another database, and we will test the migration on a test instance of SonarQube. This ensures we do not harm your production data once we have a good plan to fix this issue.

Next, can you confirm if the primary key pk_live_measures exists on the uuid column of live_measures table?

One way to get all the PKs on all your tables:

select kcu.table_schema,
       kcu.table_name,
       tco.constraint_name,
       kcu.ordinal_position as position,
       kcu.column_name as key_column
from information_schema.table_constraints tco
join information_schema.key_column_usage kcu 
     on kcu.constraint_name = tco.constraint_name
     and kcu.constraint_schema = tco.constraint_schema
     and kcu.constraint_name = tco.constraint_name
where tco.constraint_type = 'PRIMARY KEY'
order by kcu.table_schema,
         kcu.table_name,
         position;

In any case, I suggest you perform a VACUUM FULL ANALYZE as discussed in this Community guide.

After that, please try running your migration once more. If it hangs again at step 3543, please notify me.

Joe