# Postgres error 54000: index row size exceeds btree version 4 maximum 2704 for index

> A program limit was exceeded; most often a value too large for a B-tree index entry.

Source: https://scribase.com/postgres-errors/54000

SQLSTATE class: Program Limit Exceeded. Over PostgREST/supabase-js this maps to HTTP 500.

## Causes

- Indexing long text or jsonb columns with a plain B-tree index.
- Too many columns, arguments or nesting levels in one statement.

## Fixes

- Index a hash of the value instead (create index on docs (md5(body))), or use a trigram or full-text GIN index for search.
- Split very large statements into smaller ones.