1

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.

1
  • Try to make a backup with just the data: pg_dump --data-only -d your_database Commented Jun 17 at 16:41

1 Answer 1

1

If an important system catalog like pg_index has become corrupted (and who knows what else) and you don't have a backup, you are pretty much lost.

If the data are very important for you, and you have the money, you could hire a PostgreSQL forensics expert who may be able to salvage some or all of your table data. But it's likely going to be a lengthy, complicated and expensive procedure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.