I'm facing a serious issue with my PostgreSQL 13 instance on Windows. I'm unable to open a database in pgAdmin and receive the following error:
ERROR: invalid page in block 0 of relation base/16394/2610 After investigation, I found that this OID (2610) corresponds to the critical system catalog pg_index. From what I understand, this catalog is essential for managing all indexes, so corruption here is catastrophic.
My Setup PostgreSQL Version: 13
OS: Windows 10
Symptoms pgAdmin fails to open the database
psql throws an error or hangs when trying to list relations
Any attempt to REINDEX crashes due to pg_index corruption
Running pg_dump on the entire database fails early
What I've Tried Identified the corrupted relation using oid2name
Confirmed the corrupted catalog is pg_index
Considered rebuilding DB from scratch using salvaged schema and table data
I'd like to know:
Is there any safe way to reconstruct or replace pg_index?
Can I recover more data using pg_dirtyread or other low-level tools?
Should I avoid trying REINDEX SYSTEM given that pg_index is corrupted?
Any known method to surgically patch or recreate system catalogs?
I do not have a recent physical or logical backup (lesson learned 😔), so any suggestions to extract usable data or rebuild the DB from working fragments would be hugely appreciated.
Thanks so much for any guidance you can provide.