# HG changeset patch # User Alain Mazy # Date 1759133553 -7200 # Node ID 0c5918ada304ce1641993c4596530a7b4a7f5887 # Parent bf845fba50bc8656d75d614e80fee6f38f015a71 pg stats diff -r bf845fba50bc -r 0c5918ada304 Sphinx/source/plugins/postgresql.rst --- a/Sphinx/source/plugins/postgresql.rst Fri Sep 12 11:16:02 2025 +0200 +++ b/Sphinx/source/plugins/postgresql.rst Mon Sep 29 10:12:33 2025 +0200 @@ -359,9 +359,8 @@ Note for large databases and multiple Orthanc instances: """""""""""""""""""""""""""""""""""""""""""""""""""""""" -When upgrading from one revision to another, the upgrade might take quite some time. E.g, we have observed the upgrade -taking 17 minutes on a DB with 300.000 studies and 150 millions instances when upgrading from revision 1 to 2 and multiple minutes -when upgrading from revision 2 to 3. Orthanc will not respond during the upgrade. Therefore, +When upgrading from one revision to another, the upgrade might take quite some time. +Orthanc will not respond during the upgrade. Therefore, if you have enabled autohealing (automatic restart in case Orthanc is not responsive), you should likely disable it during the first start with the PostgreSQL plugin v6.0 or v7.0 which will apply these migrations. @@ -412,6 +411,20 @@ These procedures are identical to the one performed automatically by Orthanc when it detects that an upgraded is required. + +Here are typical upgrade durations we have observed, on a DB with around 350.000 studies and more than 150 millions instances +for a total of 75 TB of data. Note that, at revision 6, the DB size was around 500 GB - increased from 470 GB at revision 5. + +- Upgrade from revision 1 to revision 2: around 17 minutes. +- Upgrade from revision 2 to revision 3: around 7 minutes. +- Upgrade from revision 3 to revision 5: immediate. +- Upgrade from revision 5 to revision 6: around 22 minutes. +- Then, after upgrading to revision 6, the ``DB HOUSEKEEIPING`` task needs to update some ``ChildCount`` entries. + This is performed while Orthanc is running and accessible and 50 entries are updated every second and this must be performed + for every series, study and patient. With a DB with 350.000 studies, this took around 50 hours. + + + Troubleshooting ---------------