Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.1K
Visualizações
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 Respostas
Responde à pergunta

0

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

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda