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

136
Visualizações
What happens if JSONField has reached maximum storage limit?

This might be a simple question for an experienced (Django) developer.

My project's database is PostgreSQL.

I intend to use a single protected model instance as a centralised storage for certain data. That instance will have a JSONField which will, in turn, store a dynamic collection of key-value pairs (both are strings). By "dynamic" I mean that new key-value pairs will be added to the collection from time to time, and hence the collection will constantly grow in size.

As far as I have read (e.g. Size limit of JSON data type in PostgreSQL), the size limit of JSONField is approximately 1GB. That is quite a lot, but still not infinite.

My question is: what exactly will happen if I manage to exhaust the storage capacity of JSONField? And are there any recommendations on how to forecast this kind of situation before it happens (e.g. monitor the instance's storage size)?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Since you don't plan to manipulate the JSON value in the database, you should use data type json rather than jsonb.

If you exceed that limit, you will get an error message. But since the whole value temporarily has to be kept in RAM on the client side and the database side, I'd expect that you run into problems before that – you'll probably get an out of memory message from the database, or the performance might be really bad.

If you have more than 1GB of state to store in the database, it might be a good idea to split that into several parts and update only those parts that really got changed, like you normally do in a relational database.

over 4 years ago · Santiago Trujillo Relatório

0

Here is almost you wanted.

  • Postgresql Limit details https://wiki.postgresql.org/wiki/FAQ#What_is_the_maximum_size_for_a_row.2C_a_table.2C_and_a_database.3F

  • What if limit exceed

    https://wiki.postgresql.org/wiki/TOAST

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