Postgresql – What happens as a database grows to the HDD’s lmit

database-sizemaintenancepostgresql

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.

Best Answer

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