How to plan a PostgreSQL major version upgrade under an Orthanc archive
If the PostgreSQL server holding your Orthanc index runs version 14, plan the move to a newer major version now, because the supported window for version 14 ends November 12, 2026. A minor update is a different job: minor releases never change the internal storage format, so it only replaces executables and restarts the server. A major upgrade changes the on-disk format and needs one of three methods: a dump and restore with pg_dumpall, an in-place upgrade with pg_upgrade, or logical replication, which the PostgreSQL upgrading documentation says allows major upgrades with only several seconds of downtime. Each method has different downtime, rollback and effort profiles, so choose one in writing before the window is booked.
The supported versions at the time of writing are 18, 17, 16, 15 and 14, with support for 18 running to November 14, 2030. Versions 13 and earlier are no longer supported and should be treated as an emergency to fix, not a planning item. Before you pick a target, confirm which PostgreSQL versions the Orthanc PostgreSQL plugin release you run supports, since the plugin and its schema revision set the real limit. Check the plugin's own release notes and your Orthanc version together, and record the exact pair you will test. The PostgreSQL versioning policy lists the support dates you should cite in your change request.
Whatever method you choose, the Orthanc index must be verified on the new server before cutover. Restore or upgrade into a separate server, start a test Orthanc against it, and confirm that studies, series and instances count match the source, that a sample of retrieves and C-STORE transfers succeeds, and that the plugin reports no schema errors. Keep a hot backup of the source database taken immediately before the window so you can return to the old server if verification fails. Ask your PostgreSQL and Orthanc administrators to write the verification checklist and sign-off owners into the plan, along with the rollback point after which the old server is no longer the fallback.
What changes in PostgreSQL 18 and what it means for the Orthanc index
This table lists the PostgreSQL 18 changes that affect an Orthanc index and the server around it, with the impact on the database and clients and the action to take. Read it before planning the upgrade window, then check each action against your own Orthanc plugin version and client setup in a staging copy.
| Change | Impact | Action needed |
|---|---|---|
| Minor releases never change the storage format | Minor updates only replace executables and restart the server, so the Orthanc index files stay as they are. | Apply minor updates on the current major version without a dump and restore, but still take a backup first. |
| pg_upgrade keeps planner statistics | After a major upgrade the planner starts with statistics, so Orthanc query plans are less likely to be slow right after the switch. | Confirm the statistics are retained in your test run and still run ANALYZE if the first queries look wrong. |
| pg_upgrade parallel jobs and --swap option | Parallel jobs can shorten the in-place upgrade of a large Orthanc database, and --swap avoids copying data files. | Measure the run on a restored copy of the production database and confirm that the old cluster can be recovered if the upgrade fails. |
| Logical replication across major versions | Allows a major upgrade with only several seconds of downtime, but the replicated tables and sequences must be checked before cutover. | Ask the Orthanc database owner to confirm the plugin schema is supported by your replication setup before choosing this path. |
| Asynchronous I/O | Changes how the server reads data from disk, which can affect the performance profile of a large Orthanc index. | Benchmark index-heavy Orthanc queries on the new version before the cutover and record the results for comparison. |
| OAuth 2.0 authentication method | Adds a new way for clients to log in to the database, but Orthanc's PostgreSQL plugin uses its own configured credentials. | Keep the existing authentication method unless you have a reason to change it, and confirm with the plugin documentation what it supports. |
| uuidv7() function | Adds a new UUID generator. Existing Orthanc identifiers are not changed by the upgrade. | Do not assume Orthanc will use it. Confirm with the Orthanc project before any schema or application change. |
| Virtual generated columns by default | New generated columns are virtual, so they store no data on disk. This matters only if local SQL scripts or reports add generated columns. | Review any custom SQL, reporting views or maintenance scripts that create generated columns and set the storage type explicitly if needed. |
| MD5 password authentication deprecated for SCRAM | MD5 password hashes still work but are deprecated. Clients and the Orthanc plugin must support SCRAM before MD5 is removed. | Check password hash type in pg_authid, confirm the Orthanc PostgreSQL plugin and client drivers connect with SCRAM, then rehash passwords before switching the method. |
Dump and restore, pg_upgrade or logical replication: which method fits the archive
Three methods move a PostgreSQL cluster to a new major version, and each sets a different downtime window for the Orthanc index. Dump and restore and in-place pg_upgrade both grow with the size of the database, while logical replication shortens the cutover to the final sync. Test the method you choose on a copy of the index before you commit to it.
Dump and restore with pg_dumpall
Full logical copy, then restore. pg_dumpall writes every database, role and tablespace definition to SQL, and the new server replays that output. The Orthanc index stays offline from the first dump until the restore and index checks finish, so downtime grows with database size and the time needed to rebuild indexes. This method suits a smaller index, or a team that can schedule a long maintenance window and wants a rollback path that leaves the old server untouched until the new one is verified. Measure the dump and restore time on a copy of the index before you commit to it.
Upgrading docsIn-place pg_upgrade
Converts the data directory in place. pg_upgrade runs the new major version's binaries against the old cluster's data files, which avoids a full dump and restore. Downtime still scales with database size because the old server must be stopped while the upgrade runs. PostgreSQL 18 retains planner statistics across major upgrades and adds parallel jobs and a --swap option, so check whether a full analyze is still needed after the upgrade. Choose this path when the window is bounded and the team can rehearse the upgrade on a copy first. Confirm that every extension Orthanc relies on supports the target version, and keep the old binaries until the new cluster is verified.
Logical replication cutover
Short cutover window. The new server subscribes to the old one and copies changes while Orthanc keeps running against the old primary. Logical replication works between different major versions, and the PostgreSQL documentation describes major upgrades with only several seconds of downtime. That figure covers the final sync and the switch of Orthanc's connection settings, but the actual window depends on write volume and the cutover steps your team prepares, so it is not guaranteed. Pick this path when the archive cannot stop for a long window. Sequence values and schema changes need separate handling, so confirm each one during the test run on a copy of the index.
The decision path from current version to cutover
The path starts with the current PostgreSQL major version and the Orthanc PostgreSQL plugin version, checking whether the server version is still supported and whether the plugin is compatible with the target. The acceptable downtime then selects one of three routes: dump and restore, pg_upgrade, or logical replication. Whichever route you choose, a restore test on a copy of the archive comes before cutover, and the rollback point is fixed before the switch.
Routes from the current PostgreSQL version to cutover, with the restore test before the switch.
What to back up before a PostgreSQL major version upgrade
A PostgreSQL major upgrade under Orthanc is only as safe as the copy you can restore from. The four items below cover the data, the Orthanc configuration that points at it, a rehearsal environment, and the access rules that will be re-checked after the move. Together they give you a rollback path and a realistic picture of how long recovery takes.
Full base backup with archived WAL
Take a full base backup of the cluster that holds the Orthanc index, and keep write-ahead log archiving running so you can recover to a point just before the upgrade started. The PostgreSQL continuous archiving documentation describes this combination as the basis for point-in-time recovery. Confirm that you can restore the base backup and replay archived WAL onto your own hardware, and time it, because restore duration depends on database size, storage throughput and network speed.
Continuous archiving docsOrthanc-side configuration inventory
Record the Orthanc version, the PostgreSQL plugin version, and every configuration key that refers to the database, including host, port, database name, user and TLS options. Also list any scripts, Housekeeper jobs, monitoring agents, reverse proxies or PgBouncer instances that open connections to PostgreSQL directly. Missing one of these consumers is a common cause of failed cutovers, because it keeps pointing at the old server after the switch.
Test environment built from a restored copy
Restore the latest backup into a separate PostgreSQL server that matches the target major version, then start a staging Orthanc against it using the same plugin and configuration. Run the upgrade steps there first, check that studies are queryable and that the Orthanc logs are clean, and measure how long the full sequence takes. Treat this copy as the reference for the production runbook, not as a quick smoke test.
Client authentication settings to review
Review the pg_hba.conf rules and the roles Orthanc uses before the upgrade. PostgreSQL documents password, certificate, LDAP, RADIUS, PAM and OAuth methods, and PostgreSQL 18 deprecates MD5 password authentication in favor of SCRAM. Confirm which method each Orthanc and client connection uses, whether the new server accepts it, and who holds the credentials. A backup is not a rollback path if the restored server rejects the same logins.
How downtime, hot standbys and rollback shape the cutover window
The central decision in a PostgreSQL major upgrade under an Orthanc archive is how long the cutover window may be, because that choice determines how much preparation you build beforehand. A dump and restore keeps the procedure simple but stops Orthanc writes for the full copy and reload of the index. Logical replication, which the PostgreSQL upgrading documentation says works between different major versions, can shorten the switch to several seconds of downtime, but it requires a longer build phase in which the new server is kept in step with the old one. Ask your team or partner to state the expected window for each option against the size of your index and your intake hours, and to show the rehearsal results that support the figure.
A hot standby can help during this build phase because PostgreSQL standbys serve read-only queries, which lets you check replicated data while the primary keeps running. Replication mode matters too. With synchronous replication, a commit waits until the standby confirms it, which protects data at the cost of slower writes. With asynchronous replication, the primary does not wait, so a failover can lose the most recent commits. Decide which behavior your archive can accept, and check how Orthanc behaves if a write fails mid-cutover, since the Orthanc side of that behavior is covered in the sibling sections on schema and cluster upgrades.
PostgreSQL does not detect a failed primary or promote a standby by itself. Its failover documentation expects external tooling to handle detection and notification, so automatic failover is a separate component that needs its own testing, ownership and runbook. For a cutover, most teams keep promotion manual and documented. Rollback deserves the same care. Once Orthanc writes to the new server, returning to the old server means losing or re-synchronizing those writes, so keep the old cluster intact and its backups verified until the new cluster has passed your functional and restore checks. Confirm with your operator who authorizes the rollback and how long the old cluster is retained.
The upgrade sequence with checks and rollback points
This sequence moves the PostgreSQL server under an Orthanc index to a new major version in a order where every step ends with a verified state and a known way back. The team proves the method on a restored copy before any production writer is stopped.
Take and verify the pre-upgrade backup
The database administrator takes a full logical or physical backup of the Orthanc index database and records where it is stored and how it can be restored. Someone other than the person who took it restores it to a scratch host and confirms that the restore completes. The step is done when the restore test succeeds and the backup location, checksum and restore procedure are written down. Until this check passes, the production cluster is not changed. Rollback point: the original cluster is untouched, so the team can abandon the upgrade at no cost.
Build a restored copy and test Orthanc against it
The team restores the verified backup to a separate PostgreSQL server running the target major version and points a non-production Orthanc instance at it, using the same Orthanc and PostgreSQL plugin versions as production. The engineers confirm that Orthanc starts, reads its schema, and answers study queries and retrieves a sample of stored instances. The step closes when these checks pass on the copy and any plugin or configuration incompatibility is logged. Rollback point: production still points at the original server, so no user is affected.
Choose the method and rehearse the cutover
The team chooses between a dump and restore, an in-place upgrade with pg_upgrade, or logical replication, based on the database size, the acceptable downtime and the operators' experience. The PostgreSQL upgrade documentation describes each path, and the orthanc-setup-samples repository includes a PostgreSQL version upgrade sample that the team can use as a starting point and adapt to its own environment. The sample must be reviewed against the team's hosts, storage, authentication settings and backup tooling before use. The rehearsal records the time needed to stop Orthanc, run the upgrade, and start Orthanc again. Rollback point: the rehearsal is repeatable on the copy, and the chosen method is only approved once the timings are written down.
Stop all Orthanc writers before cutover
The operations lead stops every Orthanc instance that reads or writes the index, including instances in a multi-instance cluster that share one database, and confirms that no process still holds connections to the old server. Sending traffic to the stopped instances through the reverse proxy is also halted, and any scheduled jobs or Housekeeper runs are paused. The step is done when a connection count against the old server shows only the migration user and no application writes are logged. Rollback point: restarting the stopped instances against the unchanged old server returns the archive to service.
Run the upgrade and verify the index
The engineer runs the chosen method, either the major upgrade or the logical replication catch-up followed by a switchover. Afterward, the team compares row counts for the key Orthanc index tables between old and new servers, checks that the sequences and indexes exist, and confirms that the planner statistics are present or that an analyze run has finished. Any mismatch stops the process. The step is done when the counts match and the verification report is saved. Rollback point: until the old server is decommissioned or switched off, the team can point Orthanc back to it and restart.
Start Orthanc and check core functions
The operator starts the Orthanc instances against the new server and runs a defined checklist: study-level queries, retrieval of a sample of instances, a test store from a modality or a DICOM echo, and login through the configured authentication method. The team also checks storage reads and writes on the storage area, and reviews Orthanc and PostgreSQL logs for errors. The step closes when each check is recorded as passed. Rollback point: if any check fails, the instances are stopped again and the original server is restarted with the same configuration, which the team should have tested in advance.
Keep the old cluster for an observation period
The team keeps the old PostgreSQL server, its data directory and the verified backup in place for an observation period that is agreed in writing before cutover, and monitors the new server for errors, slow queries and authentication failures. Retention of the old cluster should be confirmed with the data owner and the compliance team, because it contains patient-identifying index data. The step is done when the observation period ends with no unresolved issues and the old cluster is decommissioned under a recorded change. Rollback point: until decommissioning, a return to the old server remains possible, although any writes made on the new server would need to be reconciled first.
What drives the effort of a PostgreSQL major version upgrade
This table lists the factors that change how much work a PostgreSQL major upgrade under an Orthanc archive takes, what each one adds, and what the team should measure before choosing a method. Read each row against your own environment, since the same upgrade can be routine for a small single-instance archive and involved for a shared, highly available cluster.
| Driver | Effect on effort | What to confirm |
|---|---|---|
| Size of the Orthanc index | The index is the part PostgreSQL holds, so a larger database lengthens dump, restore or pg_upgrade runs and the verification that follows. Referenced DICOM files stay in storage and are not moved by the database upgrade. | Database size on disk, table and index sizes, and the count of studies and instances the index references |
| Upgrade method and downtime tolerance | Dump and restore needs a longer outage than pg_upgrade, and logical replication can shorten the cutover but adds replication setup and monitoring work. | Maximum acceptable write interruption for clinical users and whether reads can continue during the window |
| Number of Orthanc instances sharing the database | Each instance must be stopped, checked and restarted against the new server, so more instances mean more coordination and a longer runbook. | Count of Orthanc instances, their plugin versions and whether they all connect to one database |
| Client connections and pooler use | Applications, Orthanc instances and any PgBouncer layer must point to the new server, and connection settings or pool modes may need changes and retesting. | Number of client connections, connection string locations, and whether PgBouncer sits in front of the server |
| Authentication changes such as SCRAM or OAuth | Moving off MD5 password authentication or adding a new method requires updated roles, client drivers and pg_hba rules, and every connecting client must be tested. | Current authentication methods in pg_hba, role password hash types, and client driver support for SCRAM |
| High availability and standby topology | Standbys must be rebuilt, reattached or upgraded in a defined order, and any failover tooling must recognize the new version. | Replication mode, number of standbys, and which external failover tool, if any, manages promotion |
| Backup tooling and restore time | A verified base backup and a tested restore are prerequisites, and the time to restore often sets the fallback window if the upgrade fails. | Backup method, last successful restore test date, and measured restore time on comparable hardware |
| Regulatory evidence the team must keep | Change records, approvals, backup verification and access logs must be retained, which adds documentation and review steps to the work. | Which frameworks apply to the archive, what change records the compliance owner requires, and where evidence is stored |
How the upgrade differs by hosting environment
In a Docker deployment, the PostgreSQL server may run in its own container, on a separate host, or as a service your platform team operates. The image tag and the mounted data volume decide what changes during the upgrade, so the team needs to know which of them it controls. A major version change means a new image and a data directory that the new major version can read, which is not the same as swapping a container tag and restarting.
- Image pins: Confirm that the PostgreSQL image tag is pinned to a specific major version, so a routine pull does not change the major version on its own.
- Volume ownership: Identify the host path or named volume that holds the data directory, and back it up before any change.
- Separate containers: If the database runs outside the Orthanc compose stack, confirm who owns that stack and who approves the change window.
- Connection settings: Check the host name and port in the Orthanc PostgreSQL plugin configuration, since a new container may get a new address.
- Orchestration rules: If a platform team runs the database, confirm its rollout and restart rules before scheduling the cutover.
Before starting, confirm with the platform owner which tag, volume and network settings the cutover will change.
On a Linux server you control, the team usually installs PostgreSQL from distribution packages, and the major version determines the package name, the service unit and the data directory path. Installing the new major version beside the old one is typical, and the upgrade then moves the data across. The team owns the operating system, the service manager and the file system, so it can plan the sequence in detail.
- Parallel installs: Confirm that the new major version can be installed alongside the current one without replacing its binaries.
- Data directory paths: Record the current data directory and the path for the new cluster, since both appear in the service configuration.
- Service restarts: Note which unit files stop and start the database and the Orthanc service, and the order in which they must stop.
- Extensions and configuration: Check that any extensions and the
postgresql.confandpg_hba.conffiles are available for the new version. - Package sources: Confirm the repository that supplies the new major version and its update channel with your operating system team.
Before starting, confirm the data directory paths and the restart order for both services on a copy of the server.
With managed PostgreSQL, the provider may offer its own major version upgrade process, which can run in place, on a replacement instance, or through a supervised window. The team owns the Orthanc side and the decision to proceed, but the provider often controls the server, the storage and the switchover. The extent of that control varies by provider, so the team has to confirm it in writing before relying on it.
- Upgrade method: Ask whether the provider upgrades in place, creates a new instance, or uses a replication-based path, and what each method means for connection strings.
- Downtime and rollback: Ask how long the cutover is expected to take, what the provider's rollback option is, and who triggers it.
- Backups and snapshots: Confirm what automated backups and point-in-time recovery the provider keeps, and whether you can take a manual snapshot before the change.
- Extension and version support: Check that the extensions the Orthanc plugin needs are supported on the target major version.
- Access and maintenance windows: Confirm who on your side may approve the maintenance window and how endpoints change after the upgrade.
Before scheduling, obtain the provider's upgrade procedure in writing and confirm that Orthanc's connection settings and the backup plan still apply.
Questions teams ask before upgrading PostgreSQL under Orthanc
How much effort does a PostgreSQL major upgrade under Orthanc take?
Effort depends mostly on the method, the size of the database, and how many systems depend on it. A dump and restore is the simplest path but takes the longest, because the whole index is rebuilt in the new server. In-place upgrades with pg_upgrade are faster on large data but need careful checks of extensions and configuration. Logical replication adds a setup phase, a sync period and a cutover plan. Other drivers include the number of Orthanc instances connected to the database, backup and rollback preparation, and the number of rehearsals before production. Ask any partner for a quote that lists each phase separately and names which phases are one-time and which are repeated for every rehearsal.
How long is the downtime when upgrading PostgreSQL for Orthanc?
Downtime depends on the method, the data size and how well the procedure was rehearsed on a copy. A dump and restore stops writes for the whole time the data takes to reload, while pg_upgrade needs a short stop but still depends on catalog size and checks. Logical replication is the option the PostgreSQL documentation ties to only several seconds of downtime for a major upgrade, because the new server stays in sync until the cutover. That figure assumes the replication setup, the Orthanc connection switch and the application restart have all been tested. Measure the downtime on a copy of your own archive before you commit to a change window.
Can our own team upgrade PostgreSQL under Orthanc using the sample?
Yes, a team with PostgreSQL and Orthanc operations experience can use the sample in the orthanc-setup-samples repository as a starting point. The sample demonstrates a PostgreSQL version upgrade for an Orthanc deployment, so it shows the sequence rather than a finished procedure for your environment. Your team will still need to adapt paths, container or service names, network rules and backup locations, and to verify results on a copy of the archive. Teams without a database administrator on the project often find it useful to have an outside partner review the plan and run the rehearsal, while keeping ownership of the production change.
What does the upgrade need from our team?
The work needs four things from your side. First, administrative access to the database host, the Orthanc hosts and the backup storage. Second, a test copy of the PostgreSQL database and a representative set of Orthanc configuration files, so the upgrade can be rehearsed. Third, a change window agreed with clinical and radiology operations, including a rollback decision point. Fourth, a named owner on the Orthanc side who can confirm the plugin version, the schema state and the acceptance checks. Ask your partner to list these inputs in the written scope so that gaps appear before work starts.
Do we have to upgrade PostgreSQL 14 now?
PostgreSQL 14 is supported until November 12, 2026, according to the PostgreSQL versioning policy. After that date it receives no further community releases, so security fixes will stop unless you move to a supported major version or pay a third party for extended support. Versions 15 to 18 are currently supported, with 18 first released on September 25, 2025. Planning should start well before the end-of-support date, because a rehearsal, a backup test and an acceptance period take time. Confirm your target version with your Orthanc plugin version and your compliance owner before the plan is fixed.
Should we combine the PostgreSQL upgrade with an Orthanc or plugin upgrade?
Avoid combining them in one change unless each step has been tested separately. Changing the PostgreSQL major version, the Orthanc core, and the PostgreSQL plugin at the same time makes it hard to tell which change caused a failure and hard to roll back. A safer sequence is to upgrade PostgreSQL on a copy, verify Orthanc against it, then schedule any Orthanc or plugin upgrade as its own change with its own backup. Schema changes in the plugin need their own test as well. If a release forces both changes together, treat the combined change as a new project with a separate rehearsal and rollback plan.
How DeployOpen scopes, delivers and supports the PostgreSQL upgrade
DeployOpen plans and carries out PostgreSQL major version upgrades for the database behind an Orthanc archive, inside infrastructure you control. The work starts with a written scope that fixes the upgrade method, the downtime window and the evidence you receive, then moves through staged testing on a copy of your data before any production change.
How we scope
- Inventory the current PostgreSQL version, the Orthanc and PostgreSQL plugin versions, and the database size before choosing an upgrade method.
- Compare dump and restore, pg_upgrade and logical replication against the downtime window your clinical users can accept.
- Agree in writing which hot backups, rollback point and cutover checks are in scope, and which items belong to your team.
- Confirm the target PostgreSQL version against the community support dates published for each major release before the plan is signed off.
How we build
- Rehearse the chosen method on a restored copy of your Orthanc index so timings and errors are measured before production.
- Confirm that the Orthanc configuration, PostgreSQL connection settings and any connection pooler behave correctly against the new server.
- Use the setup sample from the orthanc-setup-samples repository as a reference where it fits your deployment, and adapt it to your environment.
- Verify the restored index with study and instance counts, sample retrieval and Orthanc startup logs before cutover is approved.
How we hand over
- Deliver a runbook listing each step, the commands run, the expected output and the named rollback path for the upgrade window.
- Document the backup set taken before the upgrade, where it is stored and the restore test performed on it.
- Record the final versions of PostgreSQL, Orthanc and each plugin, along with the configuration changes made.
- Walk your operations and database staff through the runbook so they can repeat or audit the procedure later.
How we support
- Offer ongoing support, upgrades and continuous testing as a retainer after the handover, if your team wants it.
- Agree in the scope how minor PostgreSQL releases, which replace executables and require a restart, will be applied and tested.
- Plan follow-up reviews around the support end dates of your PostgreSQL major version so the next upgrade is scheduled early.
- Confirm with DeployOpen during scoping which support hours, response expectations and escalation contacts apply to your engagement.

