PostgreSQL Major Version Upgrade

PostgreSQL Major Version Upgrade Services: Method, Rehearsal and Rollback

Last reviewed by Tyler Eastridge

AceMQ plans and runs PostgreSQL major version upgrades: the choice between pg_upgrade, logical replication and dump and restore, the extension, collation and driver checks, a rehearsal on a copy of production with the downtime measured, and a rollback target you keep until the new version has proved itself. It is for teams on 13, 14 or 15 that want to land on a supported release on their own schedule.

final community release of PostgreSQL 14
12 Nov 2026
end of standard support for PostgreSQL 14 on Amazon RDS
28 Feb 2027
community support for each PostgreSQL major version
5 years

Is This You?

You probably need this if…

  1. 01

    You run PostgreSQL 13 or 14 and the date after which the community stops releasing fixes is on the calendar

  2. 02

    On Amazon RDS, the Extended Support surcharge for an old major is coming and nobody has priced the upgrade against it

  3. 03

    A past upgrade overran its window and the next one needs a number the change board can trust

  4. 04

    The cluster has logical replication, Patroni, pgBouncer or a CDC pipeline attached, and nobody knows what each does during a major upgrade

  5. 05

    Extensions such as PostGIS, TimescaleDB or pg_partman pin the server version, and the upgrade order is unclear

  6. 06

    A tool says pg_upgrade --link is fast, and nobody has written down what the rollback is once the new cluster has started

Outcomes

Where you are now, and where you end up

Concrete state changes, not deliverable counts. This is what actually differs about your PostgreSQL estate when the engagement closes.

  1. Before

    The upgrade is a date on a slide and a command someone found in the documentation.

    After

    A written plan with the method, the order of steps, the expected write freeze and the point after which rollback means a restore.

  2. Before

    Extensions, collations and drivers are discovered in the maintenance window.

    After

    An inventory run through pg_upgrade --check and a test restore before anyone schedules the window.

  3. Before

    The first full-size run of the upgrade is the production run.

    After

    The runbook executed end to end on a copy of production, with each phase timed and the post-upgrade statistics and query plans compared.

  4. Before

    After cutover, the old cluster is deleted to free disk and the team has no way back.

    After

    A defined retention period for the rollback target, and a monitored period on the new version before the old one goes.

Recognise your estate here? Get a quote for PostgreSQL upgrade from a senior engineer.

Contact Us

Scope

What's covered

  • 01

    Upgrade Readiness Review

    Current version and minor, extensions and their upgrade paths, collation provider, data checksum setting, reg* column types, roles still on MD5 passwords, and the settings that changed between your version and the target.

  • 02

    Method Selection

    pg_upgrade with copy, clone or link, a logical replication cutover, or dump and restore, chosen against your write freeze budget, disk headroom and rollback requirement. The choice is recorded with its trade-offs.

  • 03

    Replicas, Failover and Pooling

    Standbys rebuilt or resynced after the primary, Patroni or repmgr behavior during the change, pgBouncer and application pools, and logical replication slots and subscribers that live through or across the upgrade.

  • 04

    Extensions and Application Checks

    Extension versions installed on the target before the upgrade, drivers and ORMs tested against the new server, and statements that changed behavior between versions replayed from pg_stat_statements.

  • 05

    Rehearsal and Validation

    The runbook run on a restored copy of production. Row counts and aggregates compared, sequences checked, statistics regenerated, and the slowest statements compared before and after.

  • 06

    Cutover and Rollback

    A timed runbook with a freeze, the final checks and a rollback decision point agreed in advance, followed by a monitored period before the old cluster and its backups are retired.

Want a senior PostgreSQL engineer to scope this with you? Get a quote or send us a message.

Contact Us

The Engagement

How it actually runs

Every phase has a defined duration and a concrete artifact handed over at the end of it. You always know what stage you're in and what you've received.

  1. Phase 1First step

    Readiness Review

    We read the cluster, its extensions and its surroundings (replicas, pools, CDC, backups) and compare them with the target version. Delivery is remote and guided by your engineers, with access scoped to what each step needs. Nothing on production changes in this phase.

    You receive

    • Inventory of version, extensions, collations, replicas and clients
    • Blockers and breaking changes for your target
    • Recommended method, target version and risk register
  2. Phase 2On a copy of production

    Rehearsal

    The upgrade is run end to end on a restored copy, with pg_upgrade --check first and the full procedure after. Each phase is timed, and the application test suite and your top statements run against the new version.

    You receive

    • Timed runbook with measured freeze
    • Plan comparison for the slowest statements
    • Defect list from the application tests
  3. Phase 3Per environment

    Cutover

    Non-production environments go first and each is a further rehearsal. Production follows the same runbook, with the rollback decision point written into the change request before the window opens.

    You receive

    • Executed cutover with phase timings
    • Rollback decision log
    • Statistics regenerated and replicas back in sync
  4. Phase 4Until the new version has proved itself

    Hypercare and Handover

    We watch autovacuum, replication lag, connection counts and query latency on the new version, then agree when the rollback target can go. The runbooks and checks are handed to your team, or to 24/7 support if you want it.

    You receive

    • Post-upgrade review
    • Retirement plan for the old cluster and its backups
    • Handover pack: runbooks, dashboards and alerts

pg_upgrade, logical replication or dump and restore

The PostgreSQL 18 release notes put it plainly: moving data from an earlier release needs a dump and restore, pg_upgrade or logical replication. They differ in how long writes stop, how much disk they need and what is left to go back to.

PostgreSQL major upgrade methods compared
MethodHow it worksWrite freezeRollbackWatch for
pg_upgrade --copyCopies the data files into a new cluster of the target version. The default mode.Both servers stopped for the duration of the copy. Grows with database size.The old cluster is unmodified. Restart it.Disk for a second full copy.
pg_upgrade --cloneReflink copy of the files, on Linux with Btrfs or XFS and on macOS with APFS, per the PostgreSQL 18 docs.Much shorter than a copy.The old cluster is left untouched.Errors if the file system does not support it. Check before the window.
pg_upgrade --linkHard-links the files. The docs call it much faster because nothing is copied.The shortest of the pg_upgrade modes.Safe only until the new cluster is started. After that the old cluster cannot be used and the way back is a restore from backup.Old and new data directories must share a file system. Take and test a backup first.
pg_upgrade --swapSwaps directories, added in PostgreSQL 18 as potentially the fastest mode.Shortest when there are many relations.The old cluster is destructively modified once file transfer begins.Treat the backup as the rollback.
Logical replicationA new cluster of the target version is built, loaded and kept in sync by publication and subscription, then applications are switched.Seconds to minutes once the target has caught up, set by how fast you can stop writes and move connections.Keep the old primary intact. Going back needs reverse replication or replaying the writes.DDL, sequence values and large objects are not replicated. Tables need a primary key or replica identity.
Dump and restorepg_dump and pg_restore, or pg_dumpall, into the new cluster.Writes stop for the whole dump and restore.The old cluster stays intact.Practical for small databases or when it is also a hardware move.

Two points decide most cases. First, pg_upgrade is the shortest route when the write freeze is measured in minutes and a restore is an acceptable rollback after the first start. Second, logical replication is the technique to reach for when the freeze must be shorter than a file transfer, and it comes with a checklist: the schema has to be created by hand on the new cluster, sequence values have to be set before the switch, and large objects have to be moved another way or stored in ordinary tables. The PostgreSQL documentation presents logical replication as a way to carry a cluster through pg_upgrade, and does not claim it shortens downtime, so we measure the freeze on the rehearsal rather than quote it.

Can you jump straight from 14 to 18? The pg_upgrade documentation says it supports upgrades from 9.2.X and later to the current major release, so the tool allows it. The checks are cumulative, though. Every release you skip adds items to the release notes that matter to you, which is why the readiness review reads the notes for each major in between and not only the last one.

Rule we hold

Never combine a major version upgrade with a platform move, an operating system change or a major application release in the same window. If the target needs a newer operating system or ICU library, that is its own change, rehearsed first.

What breaks between major versions

Most upgrade failures are not the data move. They are something the old server tolerated. These are the categories we check, with examples from the PostgreSQL 18 release notes where the target is 18.

  • Extensions — pg_upgrade needs the target's extension binaries installed on the new cluster, and it writes a script to update extensions afterwards. PostGIS, TimescaleDB and similar extensions have their own version matrix with the server. We confirm a combination exists before the window is booked.
  • Data checksums — PostgreSQL 18 enables data checksums in initdb by default, and pg_upgrade requires matching settings. An old cluster without checksums needs initdb --no-data-checksums on the new one, or a separate decision to enable them.
  • Collations — Text indexes depend on the collation library that built them. Moving to a new operating system release, or to a cluster on a different provider, can change sort order silently. The 18 notes recommend reindexing full-text and pg_trgm indexes for clusters on non-libc providers.
  • Column types — pg_upgrade does not support columns of reg* types such as regproc or regconfig, apart from regclass, regrole and regtype. They are found by the check and fixed before the window.
  • Configuration files — pg_upgrade works on the data directory. The new cluster starts with its own postgresql.conf and pg_hba.conf, so settings and access rules from the old cluster are compared and merged by hand, and the differences are listed in the runbook.
  • Authentication — MD5 password support is deprecated in 18, not removed. Setting an MD5 password now emits a warning, and the 18 notes say support will be removed in a future major, so the move to SCRAM is better planned than discovered.
  • Planner statistics — PostgreSQL 18's pg_upgrade carries over most optimizer statistics but not extended statistics, so CREATE STATISTICS objects need an ANALYZE. Before 18, pg_upgrade carries none, and queries can run badly until ANALYZE finishes.
  • Defaults and renamed behavior — Examples in 18: virtual generated columns by default, a changed effective_io_concurrency default, VACUUM and ANALYZE processing inheritance children, AFTER triggers running as the role active when the event was queued, and removed columns in pg_stat_wal. We diff the settings and replay your top statements.
  • Clients — Drivers, ORMs and psql versions are tested against the target. The 18 notes warn that older psql clients can have problems with \copy against an 18 server.

Ready to talk PostgreSQL? Get a quote or send us a message.

Contact Us

The dates that set the order of work

PostgreSQL supports each major version for five years after its first release, with minor releases at least every three months. The table shows the community final release dates from postgresql.org and the end of standard support on Amazon RDS, read on 4 November 2026.

PostgreSQL major versions: community final release and Amazon RDS standard support
VersionCommunity final releaseAmazon RDS end of standard supportWhat it means for the plan
1313 Nov 202528 Feb 2026Already unsupported by the community. Upgrade is overdue, and RDS Extended Support charges have started.
1412 Nov 202628 Feb 2027The community releases no further fixes after 12 November 2026. Plan the move now, with RDS Extended Support from 1 March 2027.
1511 Nov 202729 Feb 2028Supported. Upgrade in the same project if the cluster is already being touched.
169 Nov 2028See the AWS calendarSupported.
178 Nov 2029See the AWS calendarSupported. Logical replication clusters are only carried through pg_upgrade from 17 onward.
1814 Nov 2030See the AWS calendarNewest major in the table, first released 25 September 2025.

On RDS, AWS says Extended Support is charged per vCPU-hour from the day after standard support ends, on every instance including Multi-AZ standbys, that Reserved Instance discounts do not apply, and that the rate rises in the third year. The rates are on AWS's RDS for PostgreSQL pricing page, so we do not copy them here. Rates for Aurora, Cloud SQL and Azure differ and we price those from the provider's own page during the review.

Which target to choose is part of the review. Landing on the newest major gets the longest support window and the newest features. Landing on a version with a mature ecosystem may suit an extension that has not caught up. Either way the target is a supported release, and the choice is written down with the reason.

Managed cloud, Kubernetes and operator estates

The method changes with the platform, and the checks do not. On Amazon RDS and Aurora, Cloud SQL and Azure, the provider's major version upgrade is the mechanism, and our work is the readiness review, the snapshot-based rehearsal, the parameter group and extension changes, and the application tests. On Kubernetes, the operator decides how a major upgrade runs, so we read its documentation for your version before planning, and rehearse on a copy of the persistent volumes.

Patroni and repmgr clusters need a plan for the order in which nodes are stopped, upgraded and resynced, and for what the old replicas do while the primary changes. Logical replication subscribers and Debezium connectors depend on replication slots, which only survive pg_upgrade in specific configurations. We list each slot and consumer and decide whether it is carried across or recreated.

Recognise your estate here? Get a quote for PostgreSQL upgrade from a senior engineer.

Contact Us

Who this upgrade service is not for

  • A minor version update — Minor releases do not need pg_upgrade or a project. Apply them on your normal patch cycle, or have them handled under support or managed operation.
  • A small database with a free window — If the data fits in a dump and restore inside an acceptable freeze, your own DBAs can run it with the documentation. A review is still cheap insurance, but not a project.
  • A move to another engine — Oracle, SQL Server or MySQL to PostgreSQL is a migration with its own tooling, and is covered separately.
  • Staying on an unsupported major — This service moves clusters to supported releases. It is not a plan for running 13 or 14 as they are.
  • A fixed price and date before the review — The cluster, its extensions and its surroundings set the effort. We scope after the readiness review, and quotes come back within 1 hour of getting your versions, sizes and platform.

Want a senior PostgreSQL engineer to scope this with you? Get a quote or send us a message.

Contact Us

Typical engagements

How these engagements run

Typical engagement scenarios: what the work covers and what it delivers. They describe the service, not past results.

1 / 8 case studies

All use cases

FAQ

Questions about PostgreSQL upgrade

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

Use pg_upgrade when a write freeze measured in minutes is acceptable and a restore from backup is an acceptable rollback after the first start of the new cluster. Use logical replication when the freeze has to be shorter than a file transfer, and accept the extra work: the schema is created by hand, sequence values are set before the switch, and large objects are not replicated. We time both on a rehearsal copy before recommending one.

Can we roll back after a pg_upgrade?

It depends on the mode. With the default copy mode, or with --check, the old cluster is untouched and can be restarted. With --link, the old cluster is safe only until the new cluster has been started, after which the documentation says to restore from backup. With --swap, the old cluster is modified once file transfer begins. That is why the rollback target and its retention period are decided before the window.

What happens if we are still on PostgreSQL 14 after 12 November 2026?

The community publishes no more fixes for 14 after its final release on 12 November 2026. On Amazon RDS, standard support for 14 ends on 28 February 2027, after which Extended Support is charged per vCPU-hour. The practical answer is a planned move to a supported major, which this service delivers.

Can you upgrade Amazon RDS, Aurora or a Kubernetes operator cluster?

Yes. On managed services we run the readiness review, rehearse on a restored snapshot, change parameter groups and extensions, and test the applications, while the provider's tooling performs the version change. On Kubernetes we follow the operator's documented upgrade path for your version, after rehearsing on a copy of the volumes.

Who does the work, and who runs the database afterwards?

AceMQ delivers the upgrade with partner PostgreSQL specialists, working remotely with your engineers. Afterwards you can keep the database yourselves, put it under 24/7 PostgreSQL support with response targets from 15 minutes, by plan, or have it run as a managed service on your infrastructure or ours.

Let's talk

Scope Your PostgreSQL Upgrade

Tell us the current and target versions, the platform (self-managed, RDS, Aurora, Kubernetes) and the database sizes. We will reply within 1 hour and follow with a readiness review plan and a written quote.

Email Us

Get in Touch

Talk to a PostgreSQL Expert

Send us a message and we'll follow up within 1 hour — or book a free 30-min consultation directly.

305-204-2607
info@acemq.com
66 W. Flagler St. 9th Floor
Miami, FL 33130

Prefer to talk now? Call us directly or use the consultation tab to find a time that works.

We respond within 1 hour.

Pick a time that works — no pressure, no pitch. Just 30 minutes with an expert.

We respond within 1 hour.