PostgreSQL storage usage not increasing

I am running Orthanc in production on Windows using the PostgreSQL plugin for the index and storage and are storing a large amount of radiology. The PostgresSQL database is now using 3.81TB on the hard drive (the total capacity of the drive is 4TB) with new radiology being fed in daily.

The data usage has been growing steadily every day to reach the 3.81TB that it is sitting at now. However, for several weeks now we have noticed that the data usage has been sitting steadily at 3.81TB, with only very minor increases in space usage each day (megabytes instead of gigabytes) even though we continue to feed Gigabytes of radiology into the Orthanc at our regular pace.

We are not however experiencing any of the radiology being lost or unreadable in the viewer, which is strange. We have a concern that we are missing something sinister here.

Is this something any one has experienced before or can explain why it is happening?


The first thing to check is the value of the “MaximumStorageSize” and “MaximumPatientCount” configuration options:

If one of those values is not zero, Orthanc will recycle disk space by removing the patients that were first received (i.e. Orthanc acts as a FIFO queue).


Hi Sébastien,

Thanks very much for the response. I can confirm that both are set to zero. I can paste my entire configuration if that might help the diagnosis?

What makes you think there is a problem at all?

PostgreSQL might simply be allocating space in advance given its internal heuristics, recycling disk space that contains removed images, or automatically compressing older data.

Check out the VACUUM PostgreSQL command.