PostGres SQL DB on recycle but not purging

Installation Details:

  • Software: Orthanc v1.12.3
  • Database: PostgreSQL v16
  • PostgreSQL Plugin: v6.2
  • Storage Device: 1TB SSD

Issue Summary:

  • A new instance of Orthanc was installed using PostgreSQL as the database.
  • Approximately 800GB of images were loaded into Orthanc.
  • The “MaximumStorageSize” parameter was set to 700,000 MB, and the “MaximumStorageMode” was set to “Recycle.”

Observed Problem:

  • The PostgreSQL database occupies 925GB on the SSD, despite the “MaximumStorageSize” setting.
  • Reducing the “MaximumStorageSize” to 300,000 MB did not decrease disk utilization.
  • Orthanc settings report storage usage as 279.27 GB / 292.97 GB (Recycle), yet the SSD remains nearly full with only 4GB free of 931GB.

Steps Taken:

  • Reduced “MaximumStorageSize” to 300,000 MB in Orthanc settings.
  • Verified storage usage reported by Orthanc.
  • Ran PostgreSQL VACUUM statement to reclaim space with no success.

Current Status:

  • Disk utilization remains high.
  • Orthanc reports storage within the expected limit, but SSD utilization does not reflect this change.
  • VACUUM operation on PostgreSQL did not reclaim any significant disk space.

Hi,
Are you using Postgres to store the dicom instances? Ie; setting EnableStorage of the Postgres options to true? PostgreSQL plugins — Orthanc Book documentation

Are you able to post your Orthanc Postgres Plugin configuration?

We use the MaximumStorageSize extensively with Postgres and haven’t had an issue, however we do not use Postgres to store the dicom instances, rather we store the dicom instances on the filesystem.

Cheers,

James

Hi,

Actually, VACUUM is not supposed to recover disk space. Only VACUUM FULL will do. PostgreSQL: Documentation: 16: 25.1. Routine Vacuuming

HTH,

Alain

I am using postgress to store the instances as well.