PostgreSQL; in db file storage, scalability, backups

Hi,

I was looking at Orthanc PACS and had some questions about other people’s experiences using PostgreSQL setup.

  1. Have you used in-database storage plugin. What did that do to memory consumption of Postgres for your given number of studies/files?

  2. What are the PACS size limitation when using PostgreSQL file storage. Looking at the orthanc schema it looks like text data type is used to store tag values. Then looking at postgres documentation, https://wiki.postgresql.org/wiki/BinaryFilesInDB, it looks like the limitations are 4 billion records when entry exceeds 2KB. So a single image with pixel data tag will reduce 4 billion record count by 1, and an RT Structure Set with, say 1000 contours where each contour decimal string entry > 2K will reduce count by 1000. Is that correct?

  3. In your experience when storing files in DB, is hot backup possible? That is Orthanc continues to recieve/send files while Postgres backup is happening?

  4. Is there a description of filesystem layout? For example I see the DICOM files I sent in various folders, but there are extra smaller files that don’t appear to be DICOM (dcmdump complains for example). What are those?

Thank you very much.

Hello,

  1. I let other people answer, as this is a sysadmin question.

  2. There are 2 distinct plugins for PostgreSQL: the “index” plugin and the “file storage” plugin. You are not obliged to use both of them simultaneously. On large-scale scenarios, my advise is to use the PostgreSQL index, together with the default filesystem file storage pointing to a NAS drive with proper backup strategies.

The PostgreSQL index only stores a small subset of the most common DICOM tags, aka. the “Main DICOM tags” whose list can be found in the following file:
https://bitbucket.org/sjodogne/orthanc/src/Orthanc-1.4.2/Core/DicomFormat/DicomMap.cpp#lines-47

As can be seen, pixel data and structure sets are not part of the “Main DICOM tags”, and are thus not stored in the PostgreSQL index.

  1. I let other people answer, as this is a sysadmin question.

  2. The filesystem structure is explained in the FAQ of the Orthanc Book:
    http://book.orthanc-server.com/faq/orthanc-storage.html#orthanc-storage

If you don’t use user-defined attachments, Orthanc stores two types of files as attachments in its storage area:

  • DICOM files.
  • JSON summaries of the DICOM files.

HTH,
Sébastien-

Thank you for your answers Sébastien.