Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

1.1K
Vistas
Django & Postgres - Index Row Size Exceeds btree version 4 maximum

I have defined the following in Django to store an SSL certificate in plain-text PEM format:

class Certificate(models.Model):
    pem = models.CharField(max_length=4096, unique=True, blank=False, null=False)

When populating the table column in Postgres, I'm seeing this error which says the size of the data is too large for the b-tree index:

django.db.utils.OperationalError: index row size 2720 exceeds btree version 4 maximum 2704 for index "app_certificate_pem_key"
DETAIL:  Index row references tuple (1,6) in relation "app_certificate".
HINT:  Values larger than 1/3 of a buffer page cannot be indexed.
Consider a function index of an MD5 hash of the value, or use full text indexing.

Is there a "Django" way to create a unique index based on a hash of my pem column?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

It looks like your index width is exceeded. Try to drop the index for the pem field.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda