Search Postgresql Archives

How do I repair a corrupted system table in PostgreSQL?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I just attempted to do a pg_upgrade on a fairly large PostgreSQL database cluster from version 8.3.0 to version 9.0.4. Everything looked like it was going to work just fine until the new schema was being created on the target cluster. It died trying to create a group role twice for some reason.

After looking at all the scripts, it was quite obvious that it was duplicating a group role 4 times. I brought the 8.3.0 database back up and it was very apparent that there was a row repeated in the pg_authidtable.

I tried bringing the database up in single-user mode in order to try to REINDEX TABLE pg_authid. This failed when trying to create the new index with duplicated values. I tried deleting the offending group role. This removed one of the 4 rows in pg_authid, but just seemed to confuse things further.

I saw mention that running a full vacuum on the table may repair such corruption, but I have little hope of that working. So, while the data restores, I'll fish for ideas.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux