PostgreSQL Error Reference

Every error, explained

SQLSTATE codes, condition names, root causes, diagnostic queries, and recovery steps — structured for engineers running PostgreSQL in production.

3617 errors documentedFree diagnostics on every pageAll PG versions covered

Showing 3617 of 3617 errors

XX001 ERROR

corrupted line pointer: offset = n, size = …u — XX001

data_corrupted

PostgreSQL error "corrupted line pointer: offset = n, size = …u" (SQLSTATE XX001, data_corrupted): what it means, common causes, and how to fix it.

Internal Error
XX001 PANIC

SQLSTATE XX001 — PANIC: Could Not Write to pg_wal

data_corrupted

PostgreSQL crashes with PANIC: could not write to file "pg_wal/0000000100000023": No space left on device. All connections are dropped. The WAL volume is full. PostgreSQL cannot write WAL, so it canno

XX — Internal Error
XX001 WARNING

PostgreSQL WARNING: Page Verification Failed, Checksum Mismatch

data_corrupted

A streaming standby logs WARNING: page verification failed, calculated checksum X but expected Y for a specific relation. This means a data page on the standby does not match its stored checksum — eit

XX — Internal Error
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_

XX — Internal Error
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.

Internal Error
XX002 PANIC

Index Corrupted — SQLSTATE XX002

index_corrupted

An index is corrupted.

Internal Error
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.

Internal Error
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.

Internal Error
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.

Internal Error
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.

Internal Error
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.

Internal Error
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.

Internal Error
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.

Internal Error
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.

Internal Error
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.

Internal Error
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.

Internal Error
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.

Internal Error