Why upgrading from unsupported PostgreSQL 13 and older cannot wait
If you run PostgreSQL 13, 12 or an older major release, the answer is to move to a supported major version now, and the path is set by the project's versioning policy and by pg_upgrade, which supports upgrades from 9.2.X and later to the current major release. PostgreSQL 13 reached its final release on November 13, 2025, and PostgreSQL 12 reached its final release on November 21, 2024. Neither receives security or bug fixes, so every new vulnerability in the server code stays open on your systems for as long as you wait.
As of the supplied policy, the supported majors are 18 (final release November 14, 2030), 17 (to November 8, 2029), 16 (to November 9, 2028), 15 (to November 11, 2027) and 14 (to November 12, 2026). Version 14 ends within months, so a move from 13 or older should target a release that will still be supported after your cutover and the stabilization period that follows. Confirm the target with your application vendors and extension maintainers before you pick it, because their support matrix may lag the core project.
Waiting also raises the cost of the work itself. Each skipped major release adds another round of changes to review, and older clusters often rely on features such as MD5 password hashes and extensions that no longer have builds for newer servers. Start with an inventory of versions, extensions, authentication settings and recovery procedures, then decide between an in-place pg_upgrade and a logical replication cutover. Use the sibling pages on those methods to plan the details.
Choosing the target version for an unsupported cluster
PostgreSQL 18 is the newest major line and the default target for most clusters that are leaving PostgreSQL 13 or older. Under the versioning policy, it was first released on September 25, 2025 and receives support until November 14, 2030, which gives the longest runway after cutover. Starting on a new line also means the cluster will not need another major upgrade for several years. Points to weigh:
- Longest support window: Support runs to November 14, 2030, so the upgrade you do now is the last one you may need for a long period.
- Upgrade tooling: PostgreSQL 18 pg_upgrade retains planner statistics across major upgrades and adds parallel jobs and a
--swapoption, which can shorten the cutover window. - Authentication changes: MD5 password authentication is deprecated in favor of SCRAM, so role passwords and
pg_hba.confentries need review before go-live. - Behavior changes: Asynchronous I/O and virtual generated columns are on by default, so test workloads against them rather than assuming old behavior.
- Extension availability: Confirm that every extension your applications depend on has a build for PostgreSQL 18 before committing to this target.
Confirm with your application and extension vendors that they certify PostgreSQL 18 before you set this as the target.
PostgreSQL 17 and 16 suit teams that need a longer runway on a version their extension vendors already support, or that want to avoid being the first to adopt the newest release. Support for 17 runs to November 8, 2029 and for 16 to November 9, 2028, so both still give several years of fixes after cutover. Choosing one of these lines can reduce the number of unknowns during the migration. Points to weigh:
- Extension maturity: Many extensions reach builds for an older line before the newest one, so check the release status of each extension you use.
- Shorter but still multi-year window: Version 16 leaves a shorter runway than 17 or 18, so plan the next major upgrade on the calendar early.
- Lower adoption risk: Operators, drivers and monitoring tools that your team already runs are more likely to have been tested on these lines.
- Same authentication move: Moving to either line still requires the MD5 to SCRAM review, because the deprecation applies to the whole migration path.
- Planning cost: Choosing a line you will leave sooner means a second upgrade effort is likely, so compare that against the cost of waiting for extension support.
Ask each extension vendor which PostgreSQL major versions their current release supports and whether they publish a date for the next line.
PostgreSQL 14 is a supported line, but it reaches end of life on November 12, 2026. It should only be used as a short intermediate stop, for example when an extension or application cannot run on a newer release yet and the cluster must leave PostgreSQL 13 or older quickly. Treat it as a temporary step with a dated plan to move again, because a cluster on 14 after that date receives no fixes. Points to weigh:
- Fixed end date: The support window closes on November 12, 2026, so the second upgrade must be scheduled before that date.
- Double upgrade cost: Two major upgrades cost more in testing, downtime windows and rollback planning than one direct move, so use this path only when a blocker requires it.
- Blocker evidence: Document the specific extension or application issue that prevents the direct move, with the vendor response.
- Authentication step: Reviewing MD5 passwords during the first move may save effort later, but it does not remove the need for the second upgrade.
- Exit date: Record the planned date for leaving 14 in the change calendar when the stop is approved.
Confirm the blocker with the vendor in writing and estimate the second upgrade before accepting 14 as the target.
What changes between PostgreSQL 13 and PostgreSQL 18
This table compares the changes a team meets when moving from PostgreSQL 13 to PostgreSQL 18, with the impact of each and the action to take before cutover. Read it as a checklist, then confirm each item against the release notes for every major version between 13 and 18, since the table covers only the headline changes.
| Change | Impact on your upgrade | Action needed |
|---|---|---|
| pg_upgrade keeps planner statistics (18) | Planner statistics survive the major upgrade, so the new cluster may not need a full ANALYZE before it performs well. | Confirm the statistics behavior in the 18 pg_upgrade notes, then test query plans on a rehearsal copy before cutover. |
| pg_upgrade parallel jobs and --swap (18) | Parallel jobs can shorten the upgrade step, and --swap changes how the new data directory is brought into place. | Read the pg_upgrade options for your chosen mode and check that your rollback plan still works with --swap. |
| Asynchronous I/O (18) | Changes how the server issues disk reads, so I/O patterns and storage performance may shift after the upgrade. | Benchmark representative workloads on the target version and keep the setting defaults unless tests show a reason to change them. |
| OAuth 2.0 authentication method (18) | Adds an authentication option that can connect the database to an external identity provider. | Decide whether you need it and confirm the identity provider setup with your security team. Keep existing methods until then. |
| uuidv7() function (18) | Adds a time-ordered UUID generator. Existing UUID values and columns are not changed by the upgrade. | Review whether new keys should use it and check that application code and drivers handle the new function. |
| Virtual generated columns by default (18) | Generated columns without an explicit STORED keyword are computed at read time, which changes storage and write behavior. | Find generated column definitions in your schema and state whether each should be virtual or stored before migration. |
| MD5 password authentication deprecated in favor of SCRAM (18) | MD5 hashes still work on the upgraded server but produce deprecation warnings and may be removed in a future release. | Inventory roles using MD5, move clients to SCRAM-SHA-256 and reset passwords. Run the MD5 to SCRAM plan before cutover. |
| Storage format of minor releases (all versions) | Minor releases never change the internal storage format, so they only replace executables and restart the server. | Apply the latest minor release on your current version first when possible, then plan the major jump separately. |
| Release notes for every crossed version (13 to 18) | Each intermediate major version (14, 15, 16, 17) can add behavior changes that the 18 summary does not list. | Read the release notes for each version crossed and record every item that affects your schema, extensions, clients or settings. |
How pg_upgrade handles a jump from 9.2 or later
pg_upgrade supports upgrades from 9.2.X and later to the current major release, so a cluster running PostgreSQL 12 or 13 can use it directly without stepping through intermediate versions. That is the first fact to plan around, but it is not the whole decision. The PostgreSQL upgrading documentation names three supported routes: pg_upgrade, logical replication, and dump and restore with pg_dumpall. Each one trades downtime against effort, disk space and rollback options, and the right route depends on how long your applications can be unavailable during the cutover.
If a short outage fits your service windows, pg_upgrade is usually the first route to evaluate because it works on the existing data directory and avoids a full dump and reload. If the downtime budget is tight, logical replication can move a 12 or 13 database to a newer major version with much less interruption, since the upgrading documentation describes it as allowing major upgrades with only several seconds of downtime. Dump and restore is the simplest to reason about but usually the slowest on large databases. Confirm the exact pg_upgrade behavior for your starting version, including any version-specific checks and known limitations, in the official pg_upgrade documentation before you commit to a plan. Also confirm whether logical replication is practical for your schema, since it has its own prerequisites and limits.
Before you schedule anything, run the pg_upgrade check mode against a copy of the cluster and record the results, including any extension or configuration issues it reports. Treat that output as the start of the plan, not the end. Your team should also decide in advance which route you can roll back from, because a pg_upgrade run that has already changed the old data directory leaves different options than a logical replication cutover that keeps the old cluster running.
Preparing the cluster before any upgrade work starts
Upgrading off PostgreSQL 13 or older usually means crossing several major versions, so the work starts with a recoverable cluster and a clear picture of what depends on it. The six cards below cover the backups, extensions, authentication, connected applications, rehearsal and decision ownership that every later step relies on.
Verified base backup and WAL archive
Take a fresh base backup and confirm that archived WAL files are continuous from that backup forward. This is the only route back to a known state if pg_upgrade fails partway or the cutover goes wrong. Restore the backup to a separate host and check that it starts and that the data matches expectations. Ask your team when the last successful test restore happened, not only when the last backup ran.
Continuous archiving docsExtension inventory and target builds
List every extension installed in each database, its current version and the source it was installed from. For each one, confirm that a build exists for the target major version and that its vendor supports that PostgreSQL release. Extensions without new builds are often the step that blocks an upgrade, so resolve them before scheduling a window. Record the owner of each extension and whether it can be removed.
Authentication and MD5 password audit
Review pg_hba.conf for every host entry, the authentication method it names and the address ranges it allows. Identify roles whose stored password hash is MD5 rather than SCRAM-SHA-256. Each MD5 role must be reset or retired before the target version is locked in, and every client driver must support SCRAM. Note which service accounts cannot change their passwords without an application release.
Applications and connection poolers
Build a list of every application, reporting job, batch process and administrative tool that connects to the cluster. Include PgBouncer or other poolers, since their configuration and driver behavior can change how clients authenticate after the upgrade. Assign each entry an owner who will run its test cases during the rehearsal. Missing even one scheduled job is a common cause of failures after cutover.
Rehearsal environment from production copy
Build a non-production cluster from a recent copy of production data, on the same operating system and with the same extensions and configuration. Run the full upgrade path there and time each step, including the pg_upgrade check, the upgrade itself, statistics regeneration and application tests. Keep the rehearsal environment isolated so that test traffic and masked data follow your data handling rules. Compare the result with the production runbook after each rehearsal.
Named rollback decision owner
Name one person with authority to stop the cutover and choose between continuing and rolling back. Write down the conditions that trigger a rollback, such as failed application tests or unexpected pg_upgrade errors, and who verifies each one. Confirm that the old cluster is preserved in a state that can be restarted, and that the team knows which mode of pg_upgrade was used. Agreeing these points before the window avoids debate during an incident.
The MD5 password and security risk of waiting
Waiting on an unsupported PostgreSQL version means accepting that new security fixes will not arrive. PostgreSQL 13 reached its final release on November 13, 2025 and PostgreSQL 12 on November 21, 2024, so neither receives fixes for newly found vulnerabilities. Each month on these versions, the gap between a published flaw and your exposure stays open, and your auditors will ask what compensating control covers it. Treat the upgrade as a security change, not only a platform refresh, and put a dated plan in front of the risk owner.
The password path needs early attention because it changes the cutover. PostgreSQL 18 deprecates MD5 password authentication in favor of SCRAM, so roles still storing MD5 hashes must be reset under password_encryption set to scram-sha-256 before the move. Review pg_hba.conf on the source and target, since md5 entries must become scram-sha-256 and any role that still authenticates with MD5 will fail after cutover. Confirm that every client driver, connection pooler and application library supports SCRAM before you move, and test each version against the target in staging.
If your organization needs an alternative to passwords, the documented PostgreSQL authentication methods include GSSAPI, SSPI, LDAP, RADIUS, certificate, PAM and OAuth. Choose the method during the target design, not during the cutover window, because each one needs directory, certificate or identity provider work outside the database. Note that RADIUS support is removed in a later release, so do not select it for a new target. Ask your team to confirm each driver version and authentication method in writing before the upgrade date is set.
The upgrade sequence, with checks and rollback points
This sequence moves a PostgreSQL 13 or older cluster to a supported major version in an order where each step has a check to pass and a rollback path that stays open until the cutover window closes. The old cluster is kept intact until the new one has been proven under real application traffic.
Take and verify backups of the old cluster
The database owner takes a full logical or physical backup of the source cluster before anything else changes, and stores a copy outside the host being upgraded. Restore the backup into a scratch environment and confirm that the row counts and key application queries return expected results. Rollback point: the untouched source cluster and this verified backup. Done when a restore test has succeeded, not merely when the backup job reports success.
Inventory extensions and build them for the target
List every installed extension, custom shared library, foreign data wrapper and procedural language, along with the exact versions in use. Confirm with each extension maintainer that a build exists for the target major version, and build or install those binaries on the new server. Check that the old and new installations do not share a library path that could load the wrong binary. Done when every extension loads in a test database on the target version. Rollback point: the source cluster is unchanged because no production data has moved.
Run a pg_upgrade check in a rehearsal
Restore a recent copy of the source data onto a rehearsal server with the target binaries installed, then run pg_upgrade in check mode. The check reports incompatibilities such as removed features, changed data types and extension objects that need attention before the real run. Resolve each reported item in the source schema or in the target configuration, and rerun the check until it passes cleanly. Done when the check completes without errors on a copy of current data. Rollback point: nothing has changed on production.
Migrate password hashes to SCRAM
Set password_encryption to scram-sha-256 on the source, reset role passwords so they are stored as SCRAM verifiers, and update pg_hba.conf entries that name the md5 method. Ask each application owner and driver team to confirm they support SCRAM before the change. Query the role catalog to confirm no MD5 hashes remain, then test logins from every client category. Done when all clients authenticate with SCRAM. Rollback point: the previous password hashes are not kept, so keep the pre-change backup as the recovery path if a client fails.
Perform the upgrade with the chosen mode
Run the production upgrade using the method selected for your downtime budget, either pg_upgrade in the chosen copy, link or clone mode, or a logical replication cutover. Stop writes to the source cluster only for the window agreed with the business owner, and record start and end times. Confirm the new cluster starts, accepts connections and reports the expected major version. Done when the target cluster is running with the migrated data. Rollback point depends on the mode: copy mode leaves the source intact, while link mode changes files that the source depends on, so confirm which rollback is available before starting.
Run ANALYZE and application tests
Run ANALYZE on the new cluster so the planner has fresh statistics before application traffic returns, and watch for slow queries during the first load period. Run the application test suite and the smoke tests agreed with each service owner, including background jobs, reports and batch processes. Compare key query timings with the source baseline and investigate regressions. Done when the application owners sign off that the functional tests pass and performance is acceptable. Rollback point: the source cluster remains available and has not accepted writes since the stop.
Cut over connections to the new cluster
Point connection strings, connection poolers and DNS entries at the new cluster, using the change method your platform team already runs. Confirm in the database logs and the monitoring dashboards that connections arrive from the expected applications and that no client still reaches the old host. Keep write access to the old cluster disabled so no split writes occur. Done when all application traffic reaches the new cluster and error rates match the pre-cutover baseline. Rollback point: reverse the connection change, which is only safe while the old cluster has not accepted new writes.
Keep the old cluster until the window closes
Leave the source cluster powered and its data intact, but stopped or read-only, until the agreed observation window ends and the owners accept the result. Retain the verified backup and the upgrade logs with the change record. Decommission the old cluster only after the window closes and the retention decision is documented. Done when the change owner records the closure in the change record and the old cluster is removed according to that decision. Rollback point: the retained source cluster, which is the last point at which a return to the old version is still available without restoring from backup.
How the upgrade path and rollback points fit together
The path starts with a cluster still on PostgreSQL 13 or older, which has no fixes left. The first hand-off is the method choice: pg_upgrade when a planned outage is acceptable, or logical replication when downtime must stay in seconds. Either way, the rehearsal runs pg_upgrade --check and a test restore before any production cutover. The rollback branch matters most: until sign-off, the old cluster stays intact so the team can return to it.
Decision path from an unsupported cluster to cutover, with the rollback branch kept open.
What makes the upgrade longer or riskier
The distance from PostgreSQL 13 or older to a supported release is rarely set by version numbers alone. The drivers below decide how long the cutover window runs, how many teams must change something, and how much testing is needed before anyone trusts the new cluster.
Extensions without builds for the target
Each extension in use must have a build for the target major version and a matching shared object installed in the new cluster. Extensions that have been abandoned or never updated often force a replacement, a fork or a delay. Build an inventory from pg_extension on every database, then confirm with each maintainer whether a release exists for your target. Extensions that are not on the list can block the cutover late in the project.
Data size and copy duration
The time a restore or copy takes depends on data volume, index count, and the chosen method. A dump and restore grows with the amount of data and indexes to rebuild, while pg_upgrade in link mode avoids copying data files but still needs a planned window for schema work and checks. Measure a full rehearsal on a copy of production hardware, not on a laptop, and record the result before setting a downtime budget.
Applications and drivers needing SCRAM
Roles that still store MD5 password hashes must be reset, and every application, driver and connection pooler that authenticates to them must support SCRAM-SHA-256. Older drivers, embedded clients and vendor appliances are the usual problem. Inventory every client and its authentication method in pg_hba.conf, then test each one against a staging cluster. PostgreSQL 18 deprecates MD5 password authentication, so this work is needed on any path to a supported release.
Replicas and failover tooling
Streaming replicas, Patroni or other failover tooling, and backup agents often run a version that cannot follow the new primary. Plan whether replicas are rebuilt from the upgraded primary or upgraded in place, and decide how automatic failover is paused during the change. PostgreSQL does not detect a failed primary by itself, so the external tool's state must be understood before and after the cutover.
Custom functions and deprecated features
Stored procedures, views, and custom functions can depend on behavior, syntax or system catalog details that changed across the versions crossed. Some code relies on settings or functions removed in newer releases. Run pg_upgrade --check on a copy, then test each schema object and each application code path that calls the database. Keep the list of changes found, since it becomes the acceptance test for the new cluster.
Number of major versions crossed
Each major version skipped adds a set of release notes to read, compatibility changes to test, and possibly a second upgrade step if a single path is not supported. pg_upgrade supports upgrades from 9.2 and later to the current release, so the path itself is usually available. The effort still grows with the number of versions between source and target, so count the release notes for each one before estimating.
Effort drivers and what each one changes in the plan
This table lists the factors that most change the work of moving off PostgreSQL 13 or older, what each factor alters in the plan, and what to request in a written scope. Read each row as a question to answer before a quote is final, since the drivers interact: an old extension with no new build can delay the whole cutover.
| Driver | Effect on the plan | What to ask for in a quote |
|---|---|---|
| Extension builds | Extensions compiled for the old version may have no build for the target major version, which can force a replacement, a version change or a dependency decision before cutover starts. | An inventory of every installed extension, the target build for each, and a named plan for any extension without a build. |
| Data volume | Larger clusters lengthen the dump, restore or copy steps and the data checks, and they affect how much disk space the upgrade needs during the run. | Cluster size, the upgrade method proposed for that size, and the disk space the scope assumes for the new cluster and any rollback copy. |
| Downtime budget | A tight window pushes the work toward logical replication, which adds replication setup, conflict checks and a cutover rehearsal. A longer window allows a simpler offline method. | The maximum acceptable write outage, the method chosen against it, and the rollback path that method leaves in place. |
| Client drivers | Old drivers may not support SCRAM authentication or current TLS settings, so application teams must upgrade or test drivers before the server moves. | A list of every application and driver version connecting to the database, with the change needed for each one. |
| HA topology | A primary with replicas, or a Patroni or operator-managed cluster, needs failover paused during the upgrade and replicas rebuilt or upgraded in order. | The replication topology, the failover tool in use, and the steps for pausing and resuming automatic failover. |
| Backup tooling | The team must confirm a restorable backup exists before any step changes data, and old backup tools may not read the new server version. | The backup tool and version in use, a restore test on the source cluster, and a confirmed restore point before cutover. |
| Rehearsal environments | Each rehearsal on a copy of production shows real timing, extension behavior and client errors. Fewer environments mean more risk taken at cutover. | The number of rehearsal runs, the environments used (test, staging, copy of production), and the acceptance criteria for each run. |
Questions buyers ask before upgrading unsupported PostgreSQL
What does it cost to upgrade unsupported PostgreSQL?
The cost is mostly the labor to plan, rehearse and cut over, plus any work on extensions and applications. Cost rises with the number of clusters, the size of the data, how many applications connect, the number of extensions in use, and whether you need a rollback path that keeps the old server available. Some cost is one-time, such as the migration itself and the test environment. Some recurs, such as running the new version, applying minor releases and monitoring. Ask any partner for a written scope that lists each cluster, each extension, each application connection, the test cycles and the cutover window, because those items set the quote more than the version number does.
How long does a PostgreSQL 12 or 13 upgrade take?
Duration depends on the data volume, the number of clusters, the extension work, the downtime budget and how many test rounds your change process requires. A pg_upgrade run in link mode can finish quickly on a large cluster, but the rehearsals, extension checks and application testing usually take longer than the upgrade command. A logical replication cutover shortens the downtime window but adds setup, replication monitoring and conflict checks before the switch. Ask for a schedule that separates inventory, rehearsal, cutover and post-upgrade verification, and confirm which steps your own change board must approve.
Can our own team upgrade PostgreSQL 13 without outside help?
Often yes, if the team already runs PostgreSQL in production and has tested restores, a working staging copy and someone who can read the release notes for each version between the old and new release. The work is less about the upgrade command and more about inventory: finding every extension, every connection string, every application that relies on MD5 password hashes and every backup job that depends on the old binaries. Teams with few clusters and no unusual extensions often manage it internally. Teams with many clusters, regulated change control or extensions without current builds usually bring in a partner for planning, rehearsal or the cutover.
What does the work need from our staff?
The work needs database administrators to own the cluster and its backups, application owners to confirm connection, driver and authentication behavior, and a change approver to schedule the window. Security staff should review the authentication method change, since PostgreSQL 18 deprecated MD5 password authentication in favor of SCRAM. Operations staff need to confirm monitoring, backup jobs and any automation that calls the old binaries. Expect a few named people for each cluster and time from them during inventory and during each rehearsal, not only during the cutover.
Can we skip PostgreSQL versions when upgrading from 9.2 or later?
Yes, pg_upgrade supports upgrades from 9.2.X and later directly to the current major release, so you do not have to step through every intermediate version. The choice of target still matters. PostgreSQL 14 reaches end of life on November 12, 2026, so a target of 14 starts a new upgrade cycle soon after the move. Targets 15 through 18 are supported at the time of writing, with support for 18 running to November 14, 2030. Confirm the target with your application vendors and extension maintainers before you pick it, because their support matrix often limits which version you can use.
What do we do about an extension with no build for the new version?
Start by listing every installed extension and checking whether its maintainer publishes a build for your target major version. If a build exists, install it in the new cluster before pg_upgrade runs so the update step can succeed. If no build exists, you have three options: choose a target version that the extension supports, replace the extension with a supported alternative and test the application, or keep the extension's functionality in the application layer. Each option changes the test scope and the timeline, so decide early. Do not assume that an extension missing from a package repository is unused until you have checked the database catalog.
What happens to our security if we wait to upgrade?
PostgreSQL 13 and 12 receive no fixes, so known vulnerabilities in those releases stay open until you move. Waiting also raises the cost of the eventual move, because staff knowledge fades, extensions drift further from current builds and you may face a deadline set by someone else. Security reviewers and auditors commonly ask whether databases run supported versions, so an unsupported server can appear in findings. The safer path is to plan the move now, schedule the window and confirm the target. Ask a partner or your own team to document the current exposure and the dates you plan to meet.
How DeployOpen scopes and delivers a PostgreSQL upgrade
DeployOpen approaches the move off PostgreSQL 13 and older as a written, fixed-scope engagement inside your own infrastructure. We start by inventorying the old clusters, extensions, authentication settings and applications, then agree on the target version, the upgrade method and the cutover plan before any work begins.
How we scope
- Inventory every cluster, database, extension and client connecting from PostgreSQL 13 or older
- Confirm the target major version and the upgrade method, pg_upgrade or logical replication, in writing
- Map password authentication, including any MD5 roles, and agree how each will move to SCRAM
- Agree deliverables, timelines and acceptance criteria in writing before work starts
How we build
- Build a staging copy of the old cluster and run pg_upgrade --check against it
- Find extensions without builds for the target version and agree replacements or removal
- Rehearse the full cutover, including timing, rollback steps and application connection changes
- Test restores from a backup taken before the upgrade so rollback is proven, not assumed
How we hand over
- Deliver runbooks for the cutover, rollback and post-upgrade checks in your environment
- Document the final versions, configuration changes, authentication rules and extension inventory
- Walk your database and security teams through the evidence for later review
- Provide the rehearsal results and open items so your team can run future upgrades
How we support
- Offer ongoing support, minor release patching and future major upgrades as a retainer
- Track the end-of-life dates for the versions you run and plan the next move ahead of time
- Review the target version's extensions and client drivers when you add new applications
- Retest authentication and backup restores after changes, as agreed in the retainer scope

