PostgreSQL upgrades and support

Each PostgreSQL major version is supported for five years, so upgrades before end of life are a planned project. This page covers what a partner delivers, what drives effort, and what DBA support covers after go-live.

On this page

Why PostgreSQL upgrades need a plan before end of life

If your fleet runs PostgreSQL 14 or 15, the clock is already running on end of support. Community support for 14 ends November 12, 2026, 15 ends November 11, 2027, and 16 ends November 9, 2028. Version 17 is supported until November 8, 2029, and 18 until November 14, 2030. PostgreSQL releases a new major version about once a year and supports each major for five years after its initial release, so a fleet that mixes majors will face several end-of-life dates close together. Versions 13 and earlier are already unsupported. Start by listing every cluster, its major version and its end-of-support date, then rank them by how much time each one has left. The PostgreSQL versioning policy is the reference for these dates and should be checked again before you commit to a schedule.

Minor releases are a separate, recurring obligation. PostgreSQL ships minor releases at least once every three months, and they change no storage format, so applying them means replacing executables and restarting. Your plan should set a fixed patch window, a rollback method and an owner for each cluster, because a major upgrade you postpone will still leave you running an unpatched minor in the meantime. Confirm your maintenance windows and whether your replicas can be patched in rolling order before you schedule anything.

For a single small instance with a clear owner and an easy maintenance window, an in-house team can usually handle the upgrade with careful rehearsal. A multi-cluster estate with different majors, replication topologies, extensions and compliance evidence requirements is a different job. It calls for a written inventory, a per-cluster method choice between pg_upgrade and logical replication, and a test of the application against the new version before cutover. Ask any partner for a fixed scope covering the inventory, rehearsals, cutover runbook and rollback criteria, and confirm in writing who performs each step and who signs off on the result.

What PostgreSQL upgrade and support services include

Each service below runs inside your own cloud accounts, data centers or air-gapped network, and the scope, deliverables and timeline are agreed in writing before any work starts. The cards follow one upgrade from inventory through cutover, then into the minor release and support work that keeps the cluster inside its supported window.

Version and extension inventory

We record every PostgreSQL cluster, its current major and minor version, installed extensions, replication topology, client drivers and the applications that depend on each database. The inventory shows which clusters reach end of life first. Check that it includes third-party extensions, because an extension that has no build for the target major version can block the upgrade path. The deliverable is an inventory report with an owner and a support end date for each cluster.

Support per major version
5 years
Versioning policy

Upgrade path selection

The choice is between dump and restore, pg_upgrade, and logical replication. Dump and restore is simplest but takes the longest downtime on large databases. pg_upgrade is faster in place, while logical replication can keep downtime to several seconds at cutover, with more setup work. Decide based on database size, acceptable outage, extension compatibility and how much rollback time you need. The deliverable is a written decision record with the chosen method and the reasons it was chosen.

Logical replication downtime
Several seconds
Upgrade methods

Rehearsal and validation

We run the chosen method against a copy of production in a non-production environment, then compare row counts, checksums on key tables, query plans for critical statements, and application test results. With PostgreSQL 18, pg_upgrade keeps planner statistics, so check whether the plans that matter came through as expected. Record run times for each rehearsal, because they set the cutover window. The deliverable is a rehearsal report with validation results and the timings measured in each run.

Cutover runbook

The runbook lists each step in order, with the person responsible, the go and no-go criteria, the commands to run and the checks after each step. It covers connection draining, pausing writes, final replication catch-up, switching application connection strings or pooler targets, and reopening writes. Rollback steps are written as carefully as the forward steps, including how to repoint applications to the old cluster if validation fails after go-live. The deliverable is a tested runbook and a rollback procedure.

Minor release patching

Minor releases arrive at least once every three months and do not change the storage format, so applying one means replacing executables and restarting the server. We schedule the patch, test it on a non-production replica, apply it in a standby-first order where high availability exists, and confirm the running version afterward. Ask how your team will receive security advisories and how quickly a critical fix will be scheduled. The deliverable is a patch record for each cluster with the versions before and after and the rollback point.

Release cadence

Ongoing DBA support

Ongoing support covers monitoring of replication lag, backup job results, disk growth, connection counts, and the end-of-life calendar for each major version. It also covers planned upgrades, configuration reviews and access reviews of database roles. Confirm in writing what response times apply, which hours are covered, and whether the retainer includes emergency work or only planned change. The deliverable is a monthly service report and a rolling upgrade plan that keeps every cluster inside its supported window.

What drives PostgreSQL upgrade cost and duration

This table lists the factors that change how much work a PostgreSQL upgrade takes, why each one matters, and what you can do to keep it manageable. Use it to see which parts of your estate will dominate the scope before you request a quote. The main takeaway is that the number of clusters, the extensions in use and the allowed downtime window usually matter more than raw data volume.

DriverWhy it changes effortHow to keep it down
Clusters and replicasEach cluster needs its own cutover plan, and every standby must be rebuilt or re-synced against the new major version. Effort grows with the count, not just the size.Group clusters by version and workload, standardize configuration, and upgrade similar clusters with one runbook.
Database size and schema complexityLarger databases lengthen dump, restore or replication catch-up, and many objects, partitions or views add validation work.Archive or purge old data before the upgrade and run a schema inventory to find unused objects.
Extensions and custom codeExtensions, stored procedures and application SQL must be rechecked against the target version, and some may need a newer build or a replacement.Maintain an inventory of extensions and custom code with owners, and confirm each extension supports the target major version early.
Replication and failover toolingLogical replication, streaming standbys and an external failover manager each add steps for reconfiguration, testing and rollback.Document current topology and failover procedures, and decide whether the upgrade will use the same tools afterward.
Allowed downtime windowA short window often pushes the team toward logical replication or a rehearsed pg_upgrade with link mode, which need more preparation than an offline dump and restore.Agree the acceptable window in writing and confirm which method fits it after a rehearsal on a copy of production.
Number of environmentsDevelopment, test, staging and production each need an upgrade, and differences between them are a common source of late defects.Keep environments close in configuration and data shape, and reuse the same scripts across each one.
Compliance evidence neededAssessors may expect change records, test results, backup verification and access logs for the upgrade. Producing these adds documentation work.Ask the assessor what evidence they expect and build it into the runbook and change tickets from the start.
Starting versionOlder starting versions may need intermediate steps or more compatibility checks, and versions past end of life have no vendor fixes.Check the supported version list and the release notes for each version between the start and target before planning.

How a PostgreSQL upgrades project moves from inventory to cutover

The sequence turns an aging PostgreSQL estate into a tested, documented upgrade with a known rollback path, so the move to a supported major version happens on a plan the operations team has already rehearsed.

  1. Inventory clusters and map versions

    The team lists every PostgreSQL cluster, its major and minor version, the extensions installed, the replicas attached, and the applications and reporting jobs that connect to each one. Versions are mapped against the support dates in the versioning policy so each cluster gets a target major version. The output is a signed inventory with a target version and an owner for each cluster. Confirm the end-of-life dates against the current versioning policy before the target is fixed, since the schedule is set by the project.

  2. Check extensions and application SQL

    Each installed extension is checked for availability on the target major version, and application SQL, stored procedures, drivers and ORM versions are reviewed for behavior that changed between releases. Deprecated features, such as MD5 password authentication flagged for removal in favor of SCRAM, are noted and scheduled. The output is a compatibility register listing each blocker, its fix and the person accountable for it. Vendor and extension maintainers should be asked to confirm support for the target version in writing.

  3. Choose the upgrade path

    The team selects among a dump and restore, pg_upgrade, or logical replication based on database size, tolerated downtime, the number of replicas and the rollback requirement. Logical replication can work between major versions with only several seconds of downtime, according to the PostgreSQL upgrading documentation, but it needs replication-ready tables and a cutover plan for sequences and schema changes. The output is a written decision record that names the method, the downtime budget and the rollback approach. Ask the team to confirm the downtime window with the business owners before the method is locked.

  4. Rehearse the upgrade on a copy

    The chosen method runs end to end on a restored copy of production that matches its size, extensions and configuration as closely as the environment allows. Application test suites and representative queries run against the upgraded copy, and every error is logged and traced to a fix. The step includes timing the actual procedure so the cutover runbook reflects measured behavior rather than estimates. The output is a rehearsal report and a corrected runbook that the operations team has walked through at least once.

  5. Review performance and planner statistics

    After the rehearsal, query plans and response times on key workloads are compared between the old and new versions to catch regressions. The team checks how planner statistics are carried across the upgrade and whether an ANALYZE run is needed before traffic returns. For PostgreSQL 18 targets, pg_upgrade retains planner statistics, which changes the post-cutover checklist, so the team confirms that behavior on its own version pair. The output is a performance sign-off with any tuning changes recorded for the customization work.

  6. Execute the cutover with a rollback path

    On the agreed window, the team stops writes or switches traffic according to the chosen method, runs the upgrade, and starts the new cluster. Backups are verified before the change begins, and the rollback steps are tested as part of the runbook. Application connections, replicas and monitoring are checked as each step completes. The output is a cutover log with timestamps, the observed downtime, and a confirmed state of the new primary and any standbys. Ask who holds decision authority to roll back and how long that decision can wait.

  7. Verify the upgraded environment

    After cutover, the team confirms application connectivity, replication health, backup jobs and monitoring alerts against the new version, and checks that minor release tooling points at the correct binaries. Logs are reviewed for errors that did not appear in the rehearsal. The output is a post-upgrade verification record that the operations team signs off before the rollback window closes. Confirm with the team how long the old cluster is retained before it is decommissioned.

  8. Hand over and set the support cadence

    The engineers who will run the environment receive the runbooks, the compatibility register, the rehearsal and cutover records, and the schedule for applying quarterly minor releases. Ongoing DBA support, if purchased, is set up with agreed response expectations, patch windows and monitoring ownership. The output is a handover document and a documented support calendar that names the owner for each recurring task. Confirm the support scope and terms in the written agreement before the handover is accepted.

How the upgrade path changes with the starting point

Use pg_upgrade when you can accept a planned downtime window and want to keep the existing data directory on the same host or storage layout. The tool converts the on-disk catalog to the new major version without a full logical dump and restore, which is why it is the common choice for single-primary estates with a known maintenance window. PostgreSQL 18 changed the picture in three useful ways: pg_upgrade retains planner statistics across the upgrade, it can run parallel jobs, and it offers a --swap option that avoids copying data files when the old cluster can be discarded.

  • Downtime window: the cluster is stopped for the upgrade, so the window must cover the pg_upgrade check run, the upgrade itself, the post-upgrade steps and application validation.
  • Planner statistics: on PostgreSQL 18, retained statistics reduce the period of poor query plans after restart, but confirm them in a staging run.
  • Parallel jobs: set the job count to match your I/O and CPU headroom, and measure it on a copy of production.
  • Rollback path: keep the old binaries and data directory until validation completes, and do not use --swap until the rollback decision is closed.
  • Extensions and standbys: confirm each extension supports the target version and plan how standbys are rebuilt or upgraded afterward.

Before committing, run a rehearsal on a restored copy of production and confirm the downtime measured there against the window you have agreed.

The upgrade decision path runs from version check to cutover

The path starts with a check of whether the current major version is still inside its support window, since each major receives five years of support. Next, the team inventories extensions and applications, then chooses between pg_upgrade and logical replication based on the allowed downtime window and the existing replication setup. Both branches end in a rehearsal and validation step, and a failed validation returns the work to the chosen method rather than forward to cutover. After cutover, the cluster moves onto the minor release cycle, which is where ongoing support begins. Check extension compatibility and rollback readiness before leaving each branch.

Decision path from support check through rehearsal, cutover and ongoing minor releases.

What goes wrong in PostgreSQL upgrades and how to prevent it

Most PostgreSQL upgrade problems come from work that was never inventoried or rehearsed: extensions, application SQL, standbys, rollback paths and authentication settings. Each card names one failure mode and the step that prevents it before the production cutover window.

Extensions and functions that do not match

Extensions, custom C functions and compiled libraries are built for specific major versions, so they can block the upgrade or fail after it. Build an inventory of every extension in each database with its installed version, then confirm that a build exists for the target version before scheduling. Include extensions loaded through shared_preload_libraries and any custom procedural language code. Ask your vendor or extension maintainer for written confirmation of support for the target release.

Upgrade docs

Application SQL relying on changed behavior

Application queries can depend on behavior that changed between major versions, such as default settings, deprecated syntax or planner choices that shift performance. Run your test suite and a replay of representative production queries against the target version, and compare results and timings. Pay attention to ORM-generated SQL, which is harder to review by hand. Record every difference and assign an owner before go-live.

Skipped or partial rehearsal

An upgrade that has only run once in a test environment is not a plan. Rehearse the full sequence on a copy of production-sized data, including the dump or replication setup, the outage window, application reconnection and post-upgrade checks. Time each step and record the actual duration, since the cutover window depends on it. Repeat the rehearsal after any schema or extension change made during the planning period.

Unclear rollback after cutover

Once applications write to the new version, returning to the old one can mean losing those writes. Decide before cutover whether rollback means reverting to the old cluster or accepting a forward fix, and document the trigger conditions. If you use logical replication, keep the source running and replicate reverse changes where your design allows it. Confirm the rollback steps in the rehearsal, not just on paper.

Replication slots and standbys left out

Standbys, replication slots and backup jobs tied to the old cluster are often forgotten during planning. An unused replication slot can make the primary retain WAL until disk fills, and a standby on the old major version cannot follow the new primary. Inventory every standby, slot, subscription and backup job, then decide whether each is rebuilt, reconfigured or retired. Verify that monitoring and failover tooling point to the new cluster after the change.

MD5 password authentication still in use

PostgreSQL 18 deprecated MD5 password authentication in favor of SCRAM, so roles and pg_hba.conf rules that still rely on MD5 need attention during the upgrade. Check password_encryption and which hashes are stored for each role, then reset passwords where needed so they are stored as SCRAM. Update client drivers that do not support SCRAM. Test every application login path before cutover, since a mismatch will block connections immediately after the switch.

PostgreSQL 18 release notes

What PostgreSQL DBA support covers after go-live

This table lists the recurring tasks that keep a self-hosted PostgreSQL cluster supported after go-live, who typically performs each one, and whether it is a retainer item or a fixed-scope project. Read it to separate the software cost, which is zero under the PostgreSQL License, from the people and hosting costs that carry the long-term budget.

Recurring taskWhat it involvesTypical owner and model
Minor release updatesReplace executables on the quarterly minor release cadence and restart. Minor releases do not change the storage format, but you still need a maintenance window and a rollback plan.Internal DBA or retainer. Ongoing, recurring.
Major version planningTrack the five-year support window for each major version. Plan the annual major release move with pg_upgrade or logical replication before end of life.Fixed-scope upgrade project, usually scheduled ahead of each end-of-life date. One-time per upgrade.
Monitoring and alert upkeepMaintain dashboards, replication lag alerts, disk and connection thresholds, and tune them as workloads change.Internal platform team or retainer. Recurring.
Backup verificationConfirm that base backups and WAL archives complete, and run scheduled test restores to prove recovery objectives still hold.Internal DBA or retainer. Recurring, with periodic restore drills.
PgBouncer and TLS certificate upkeepApply PgBouncer releases, rotate TLS certificates before expiry, and review authentication settings after changes.Internal operations team or retainer. Recurring.
Internal skills neededStaff who can read PostgreSQL logs, run replication and recovery procedures, and perform failover. Confirm coverage for absences and on-call rotation.Internal staffing decision. Ask any partner which skills their retainer adds and which must remain in-house.

What the client needs to provide before an upgrade starts

The upgrade plan is only as good as the information behind it, so the first input to supply is read-only access to every cluster in scope, along with the configuration that shapes the upgrade. That means the postgresql.conf and pg_hba.conf files, the replication and archiving settings, the installed package versions, and the output of queries that list databases, extensions and roles. Read-only access lets the team check the current major version against the support dates in the PostgreSQL versioning policy and see whether a move to a supported major version is already overdue. Confirm internally who owns each cluster, which environments exist, and whether production access is restricted to a bastion host or a change window, because that decides how the assessment is run.

The client also needs to supply a current inventory of extensions and applications. Extensions such as those installed on the server must be checked against the target major version before any cutover date is set, and every application, reporting job and integration that connects to the database needs a named contact and a known driver version. Alongside the inventory, provide recent backup and restore evidence: the date of the last successful base backup, the archive location, and the result of the most recent test restore. An upgrade that depends on a backup nobody has ever restored is a risk the team must plan around before it starts, not after a failed step.

Before the first working session, confirm three things with the internal team. The first is the downtime window and change calendar, including freeze periods, regulatory reporting dates and any approval steps the change board requires. The second is a test environment that resembles production in version, data volume and extensions, so that the upgrade method can be rehearsed. The third is a short list of named owners for application, database and security decisions, with authority to accept risk on each. Scope, deliverables and timelines are confirmed in writing before work begins, so these inputs should be agreed internally first and then reflected in that written scope.

PostgreSQL upgrades and support questions buyers ask

Can our own team run a PostgreSQL major upgrade without outside help?

Yes, if your team has someone who has run a major upgrade before and time to rehearse it. The work is well documented: the official upgrading guide describes three routes (pg_dumpall and restore, pg_upgrade, and logical replication), and each one is a sequence of checks, a test run on a copy of production, and a cutover. The risks come from what surrounds the database: extensions that must be available on the new version, application queries that behave differently, backup and monitoring tools that need updating, and a rollback plan that has been tested. Teams often bring in outside help for the first upgrade of a business-critical cluster, then keep the know-how in house. Ask a partner to show which of these steps they will rehearse and which they expect your staff to own.

What drives the cost and duration of a PostgreSQL major upgrade?

The main drivers are the number of clusters, database size, how many applications connect, how many extensions are installed, how much downtime the business accepts, and how thoroughly testing must be documented. A small cluster with a generous maintenance window is a much smaller job than several replicated clusters with a strict cutover window and audit evidence requirements. Logical replication lowers downtime but adds setup, monitoring and validation work. Ask any provider for a written scope that lists each cluster, each application, the cutover method, the test environments and the rollback procedure, and ask which of these items are fixed and which depend on findings during testing. Cost has two parts: one-time planning and execution, and any ongoing support you add afterward.

How long before end of life should we start planning an upgrade?

Start planning well before the support date, because the upgrade itself is only the last stage. PostgreSQL supports each major version for five years after its initial release. Version 14 is supported until November 12, 2026, version 15 until November 11, 2027, version 16 until November 9, 2028, version 17 until November 8, 2029, and version 18 until November 14, 2030. Versions 13 and earlier are already unsupported. A reasonable plan inventories extensions and application drivers, tests on a copy of production, and schedules change windows around business cycles. Any version whose support ends within the next year or so should already be in a planning cycle. Confirm the dates against the versioning policy page, since they are the source of truth.

Should we use pg_upgrade or logical replication for a major upgrade?

Use pg_upgrade when a short maintenance window is acceptable and you want the simplest, most predictable path. Use logical replication when the downtime window must be very small. According to the official upgrading guide, logical replication works between different major versions and allows major upgrades with only several seconds of downtime. The trade-off is setup complexity: you must handle schema changes, sequences, and objects that logical replication does not carry, and you must validate that both sides agree before cutover. For PostgreSQL 18, pg_upgrade retains planner statistics across major upgrades and adds parallel jobs and a --swap option, which can shorten the window for some clusters. Test both methods on a copy of your data before deciding.

What does the upgrade need from our staff?

The work needs named people from the database team, application owners who can run their test suites, a change manager who can schedule windows, and someone who can approve the rollback decision. Your database team should be ready to review configuration, authentication rules and backup settings after the upgrade, because some defaults change between versions. Application owners need to confirm driver versions and query behavior against the new major version. Ask a partner to list these roles in the statement of work, with estimated hours per role, so you can see where your staff time goes before work starts.

Do minor releases need the same care as major upgrades?

Less, but not none. PostgreSQL releases minor versions at least once every three months, and minor releases never change the internal storage format. Updating means replacing executables and restarting, so no data conversion is involved. Even so, a restart is a service interruption, replicas need to be updated in order, and you should check release notes for behavior changes and security fixes. Treat minor updates as routine operations with a tested runbook, a maintenance window, and a documented rollback to the previous binaries. Security teams often expect a defined patch cadence, so record when each minor release is applied.

What does ongoing DBA support cover after the upgrade?

Ongoing support usually covers monitoring review, applying minor releases on a defined cadence, backup and restore verification, capacity checks, configuration and authentication reviews, and response to incidents within agreed hours. It can also include planning the next major upgrade before the support date for your current version. Support is typically a recurring cost, so ask what is included, what counts as an incident, how urgent requests are handled, and whether restore tests and failover tests are part of the retainer or billed separately. DeployOpen offers ongoing support, upgrades and continuous testing as retainers, and the exact coverage is set out in writing for each engagement.

How DeployOpen scopes, delivers and supports PostgreSQL upgrades

DeployOpen plans and carries out PostgreSQL upgrades inside your own infrastructure, from cloud accounts to data centers or air-gapped networks. Each engagement starts with a written scope, is built and tested on a copy of your environment, and is handed over with documentation your team can run.

How we scope

  • Inventory every PostgreSQL cluster, its current major and minor version, and extensions in use.
  • Map each cluster to its end-of-life date and agree a target major version in writing.
  • Confirm the upgrade method, either pg_upgrade or logical replication, and the downtime window your business accepts.

How we build

  • Rehearse the upgrade on a staging copy that matches production configuration, roles and data volume.
  • Test application compatibility, extensions, backup and restore, and replication after each rehearsal step.
  • Document rollback steps and verify them before the production change window opens.

How we hand over

  • Deliver runbooks covering the upgrade steps, validation queries, rollback procedure and post-upgrade checks.
  • Walk your database and operations staff through the change and the evidence collected during testing.
  • Record configuration changes, version inventory and minor release status so later reviews can reuse them.

How we support

  • Offer ongoing support, minor release application and upgrade planning as a retainer after the engagement.
  • Agree in the scope which tasks recur, such as quarterly minor releases, and which need a new quote.
  • Confirm response expectations and reporting in writing before the retainer starts, since terms are set per client.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.