I just tried pg_upgrade on a fairly large PostgreSQL database cluster from version 8.3.0 to version 9.0.4. Everything looked as if everything would work well until a new scheme was created in the target cluster. He died trying to create a group role twice for some reason.
Having looked at all the scenarios, it was obvious that he duplicated the group role 4 times. I returned the database 8.3.0, and it was very obvious that the pg_authidrow was repeated in the table .
I tried to bring the database into single user mode to try REINDEX TABLE pg_authid. This failed when trying to create a new index with duplicate values.
I tried to remove the role of attackers. This removed one of the four lines in pg_authid, but it just seemed like it was even more confusing.
I saw a mention that a complete vacuum on the table can restore such corruption, but I have little hope that it works. So, while the data is being restored, I will fish for ideas.
source
share