changeset 1143:40d9e349f1c2

pg 7.2
author Alain Mazy <am@orthanc.team>
date Thu, 27 Feb 2025 09:33:35 +0100 (2 months ago)
parents 70e3030830e5
children 35619bb62894
files Sphinx/source/plugins/postgresql.rst
diffstat 1 files changed, 54 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/Sphinx/source/plugins/postgresql.rst	Mon Feb 24 12:28:02 2025 +0100
+++ b/Sphinx/source/plugins/postgresql.rst	Thu Feb 27 09:33:35 2025 +0100
@@ -58,19 +58,21 @@
     "Name" : "MyOrthanc",
     "PostgreSQL" : {
       "EnableIndex" : true,
-      "EnableStorage" : true,
+      "EnableStorage" : false,               // You likely don't need to enable this option 
       "Host" : "localhost",
       "Port" : 5432,
       "Database" : "orthanc",
       "Username" : "orthanc",
       "Password" : "orthanc",
-      "EnableSsl" : false,               // New in release 3.0
-      "MaximumConnectionRetries" : 10,   // New in release 3.0
-      "ConnectionRetryInterval" : 5,     // New in release 3.0
-      "IndexConnectionsCount" : 50,      // New in release 4.0 - new default value in 7.0
-      "TransactionMode": "ReadCommitted",// New in release 6.0 - new default value in 7.0
-      "EnableVerboseLogs": false,        // New in release 6.0
-      "HousekeepingInterval": 1          // New in release 7.0
+      "Lock" : true,
+      "EnableSsl" : false,                   // New in release 3.0
+      "MaximumConnectionRetries" : 10,       // New in release 3.0
+      "ConnectionRetryInterval" : 5,         // New in release 3.0
+      "IndexConnectionsCount" : 50,          // New in release 4.0 - new default value in 7.0
+      "TransactionMode": "ReadCommitted",    // New in release 6.0 - new default value in 7.0
+      "EnableVerboseLogs": false,            // New in release 6.0
+      "HousekeepingInterval": 1,             // New in release 7.0
+      "AllowInconsistentChildCounts": false  // New in release 7.2
     },
     "Plugins" : [
       "/home/user/orthanc-databases/BuildPostgreSQL/libOrthancPostgreSQLIndex.so",
@@ -193,7 +195,6 @@
   <revisions>` to protect metadata and attachments from concurrent
   modifications.
 
-  
 
 .. _postgresql-lock:
 
@@ -249,12 +250,6 @@
 in the configuration of your PostgreSQL server
 
 
-Scalability
-^^^^^^^^^^^
-
-When configuring your PostgreSQL plugin, ensure you've read the :ref:`scalability section 
-<scalability>`
-
 Transaction modes (new in version 6.0)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
@@ -269,6 +264,33 @@
 - ``ReadCommitted`` that allows multiple threads or Orthanc instances to write at the
   same time to the same Database.  This is the default setting starting from release 7.0.
 
+Optimizations
+^^^^^^^^^^^^^
+
+* ``AllowInconsistentChildCounts`` has been added in the release 7.2 to provide
+  some optimization when accessing e.g tags like ``NumberOfStudyRelatedInstances``.
+  If set to ``true``, childCount values of recently ingested resources will be 
+  incorrect until the next execution of the DB housekeeping thread.
+
+
+Other options
+^^^^^^^^^^^^^
+
+* ``EnableVerboseLogs`` has been added in the release 6.0 to log the 
+  SQL queries that are being executed.  This is mainly target at developers.
+
+* ``HousekeepingInterval`` has been added in the release 7.0 to define the
+  interval (in seconds) at which the DB housekeeping thread is executed.  The
+  DB housekeeping thread is in charge of updating values like the statistics
+  and childCount entries to speed up their computation. 
+
+
+Scalability
+^^^^^^^^^^^
+
+When configuring your PostgreSQL plugin, ensure you've read the :ref:`scalability section 
+<scalability>`
+
 
 Upgrades/Downgrades
 ^^^^^^^^^^^^^^^^^^^
@@ -284,15 +306,23 @@
 +---------------------------+-------------------------------------------+
 | 6.0 - 6.2                 | 2                                         |
 +---------------------------+-------------------------------------------+
-| from 7.0                  | 3                                         |
+| 7.0 - 7.1                 | 3                                         |
++---------------------------+-------------------------------------------+
+| from 7.2                  | 4                                         |
 +---------------------------+-------------------------------------------+
 
+
 Upgrades from one revision to the other is always automatic.  Furthermore, if you are upgrading
-from e.g plugin 3.3 to 7.0, Orthanc will apply all migration steps autonomously.
+from e.g plugin 3.3 to 7.2, Orthanc will apply all migration steps autonomously.
 
 However, if, for some reasons, you would like to reinstall a previous plugin version, the
 older plugin might refuse to start because the revision is newer and unknown to it.
 
+To downgrade from revision 4 to revision 3, one might run this procedure::
+
+  $ wget https://orthanc.uclouvain.be/hg/orthanc-databases/raw-file/default/PostgreSQL/Plugins/SQL/Downgrades/Rev4ToRev3.sql
+  $ psql -U postgres -f Rev4ToRev3.sql
+
 To downgrade from revision 3 to revision 2, one might run this procedure::
 
   $ wget https://orthanc.uclouvain.be/hg/orthanc-databases/raw-file/default/PostgreSQL/Plugins/SQL/Downgrades/Rev3ToRev2.sql
@@ -336,6 +366,13 @@
   $ psql -U postgres -f Rev2ToRev3.sql
   $ psql -U postgres -f PrepareIndex.sql
 
+To upgrade manually from revision 3 to revision 4::
+
+  $ wget https://orthanc.uclouvain.be/hg/orthanc-databases/raw-file/default/PostgreSQL/Plugins/SQL/Upgrades/Rev3ToRev4.sql
+  $ wget https://orthanc.uclouvain.be/hg/orthanc-databases/raw-file/default/PostgreSQL/Plugins/SQL/PrepareIndex.sql
+  $ psql -U postgres -f Rev3ToRev4.sql
+  $ psql -U postgres -f PrepareIndex.sql
+
 These procedures are identical to the one performed automatically by Orthanc when it detects that an upgraded is required.