I'm running a PostgreSQL database and from what I read, the database is unlimited in size. Is there any material I can read to understand what occurs when the HDD fills to capacity? What sort of monitoring must be done in order to insure continuous operation?

One solution would be to create an arbitrary limit of free space and once that free space has been reached, you would force the user to purge off older data. Is that a proper solution? I'm interested in learning what other solutions exist and how databases are properly maintained.

  • When - or rather before - the HDD fill, attach more (HDD or SSD ;) Commented Aug 30, 2016 at 18:48
  • When disk comes full, PostgreSQL will start failing with queries that need to change things on disk and will start throwing errors about it. Commented Aug 30, 2016 at 19:32

1 Answer 1


When the hdd fills the DB could no longer write and it will crash. But that is the easy thing to solve & monitor- whenever you reach 85% capacity just add more or clear old data.

The harder/more important part is to ensure performance is not impacted by the growth in data (more rows to scan) Usually this is handled by partitions and cleanup processes which somewhat mitigate the first issue as well.

Regards Jony

  • Crash? That would be a very bad database engine. PostgreSQL will not crash under normal conditions even when disk is full. Commented Aug 30, 2016 at 19:32
  • Depending on the exact scenario- the options are either crash or hang. Unfortunately with enough experience in production you tend to see both... All DBs crash from time to time- it's just software, you should judge them by what happens to your data - and the good news is usually it's safe :)
    – cohenjo
    Commented Aug 31, 2016 at 3:52
  • The crash might not be due to PostgreSQL's error - should the database be on the same logical partition as the operating system, then PostgreSQL might fail because the OS is crashing. Commented Aug 31, 2016 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.