Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

269
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!