Every error, explained
SQLSTATE codes, condition names, root causes, diagnostic queries, and recovery steps — structured for engineers running PostgreSQL in production.
Showing 3910 of 3910 errors
XX001
ERROR
PostgreSQL: Index Marked INVALID After Failed CREATE INDEX CONCURRENTLY
data_corrupted
A DBA ran CREATE INDEX CONCURRENTLY idx_orders_status ON orders(status) but cancelled it midway (Ctrl+C or statement timeout). PostgreSQL leaves behind a partially-built index marked as INVALID in pg_
XX001
ERROR
invalid page in block N of relation … — XX001
data_corrupted
PostgreSQL error "invalid page in block N of relation … — XX001" (SQLSTATE XX001): what it means, common causes, and how to fix it.
XX001
ERROR
found xmin N from before relfrozenxid N — XX001
data_corrupted
PostgreSQL error "found xmin N from before relfrozenxid N — XX001" (SQLSTATE XX001): what it means, common causes, and how to fix it.
XX002
ERROR
index “…” contains corrupted page at block n — XX002
index_corrupted
PostgreSQL error "index "…" contains corrupted page at block n" (SQLSTATE XX002, index_corrupted): what it means, common causes, and how to fix it.
XX002
ERROR
corrupted BRIN index: inconsistent range map — XX002
index_corrupted
PostgreSQL error "corrupted BRIN index: inconsistent range map" (SQLSTATE XX002, index_corrupted): what it means, common causes, and how to fix it.
XX002
PANIC
Index Corrupted — SQLSTATE XX002
index_corrupted
An index is corrupted.
XX002
ERROR
index “…” contains unexpected zero page at block N — XX002
index_corrupted
PostgreSQL error "index "…" contains unexpected zero page at block N" (SQLSTATE XX002): what it means, common causes, and how to fix it.
XX002
ERROR
unexpected page type 0xn in BRIN index “…” block n — XX002
index_corrupted
PostgreSQL error "unexpected page type 0xn in BRIN index "…" block n" (SQLSTATE XX002, index_corrupted): what it means, common causes, and how to fix it.
XX002
ERROR
index “…” has wrong hash version — XX002
index_corrupted
PostgreSQL error "index "…" has wrong hash version" (SQLSTATE XX002, index_corrupted): what it means, common causes, and how to fix it.
XX002
ERROR
index “…” is not a hash index — XX002
index_corrupted
PostgreSQL error "index "…" is not a hash index" (SQLSTATE XX002, index_corrupted): what it means, common causes, and how to fix it.
XX002
ERROR
right sibling’s left-link doesn’t match: block n links to n instead… — XX002
index_corrupted
PostgreSQL error "right sibling's left-link doesn't match: block n links to n instead of expected n in index "…"" (SQLSTATE XX002, index_corrupted): what it means, common causes, and how to fix it.
XX002
ERROR
failed to re-find parent key in index “…” for split pages n/n — XX002
index_corrupted
PostgreSQL error "failed to re-find parent key in index "…" for split pages n/n" (SQLSTATE XX002, index_corrupted): what it means, common causes, and how to fix it.
XX002
ERROR
index “…” is not a btree — XX002
index_corrupted
PostgreSQL error "index "…" is not a btree" (SQLSTATE XX002, index_corrupted): what it means, common causes, and how to fix it.
XX002
ERROR
version mismatch in index “…”: file version n, current version n, m… — XX002
index_corrupted
PostgreSQL error "version mismatch in index "…": file version n, current version n, minimal supported version n" (SQLSTATE XX002, index_corrupted): what it means, common causes, and how to fix it.
XX002
ERROR
target page left link unexpectedly changed from n to n in block n o… — XX002
index_corrupted
PostgreSQL error "target page left link unexpectedly changed from n to n in block n of index "…"" (SQLSTATE XX002, index_corrupted): what it means, common causes, and how to fix it.
XX002
ERROR
btree level n not found in index “…” — XX002
index_corrupted
PostgreSQL error "btree level n not found in index "…"" (SQLSTATE XX002, index_corrupted): what it means, common causes, and how to fix it.
XX002
ERROR
heap tid from index tuple (n,n) points past end of heap page line p… — XX002
index_corrupted
PostgreSQL error "heap tid from index tuple (n,n) points past end of heap page line pointer array at offset n of block n in index "…"" (SQLSTATE XX002, index_corrupted): what it means, common causes, and how to fix it.
XX002
ERROR
heap tid from index tuple (n,n) points to unused heap page item at… — XX002
index_corrupted
PostgreSQL error "heap tid from index tuple (n,n) points to unused heap page item at offset n of block n in index "…"" (SQLSTATE XX002, index_corrupted): what it means, common causes, and how to fix it.
XX002
ERROR
heap tid from index tuple (n,n) points to heap-only tuple at offset… — XX002
index_corrupted
PostgreSQL error "heap tid from index tuple (n,n) points to heap-only tuple at offset n of block n in index "…"" (SQLSTATE XX002, index_corrupted): what it means, common causes, and how to fix it.
XX002
ERROR
table tid from new index tuple (n,n) overlaps with invalid duplicat… — XX002
index_corrupted
PostgreSQL error "table tid from new index tuple (n,n) overlaps with invalid duplicate tuple at offset n of block n in index "…"" (SQLSTATE XX002, index_corrupted): what it means, common causes, and how to fix it.
XX002
ERROR
table tid from new index tuple (n,n) cannot find insert offset betw… — XX002
index_corrupted
PostgreSQL error "table tid from new index tuple (n,n) cannot find insert offset between offsets n and n of block n in index "…"" (SQLSTATE XX002, index_corrupted): what it means, common causes, and how to fix it.
XX002
ERROR
index “…” contains unexpected zero page — XX002
index_corrupted
PostgreSQL error "index … contains unexpected zero page — XX002" (SQLSTATE XX002): what it means, common causes, and how to fix it.