skip to content

Release Lifecycle

PostgreSQL ships one major version a year and quarterly minor fixes, and moving to a new major takes pg_upgrade, a dump or a replication cutover. Interviewers ask how you would upgrade safely.

part ofPostgreSQLread it →
on this pageshow

explore

questions

11

In PostgreSQL, what is the difference between a major release such as 18 and a minor release such as 18.6, and how is each applied?

level: juniorimportance: must knowfreq 70%

answer

  1. two numbers since version 10
  2. on-disk format: frozen or free to change
  3. binaries out, data directory stays
  4. yearly majors, quarterly minors

basics

~20 s

A PostgreSQL major (17, 18) adds features and may change the on-disk format, so reaching it needs dump/restore, pg_upgrade or logical replication. A minor (18.4 to 18.6) only fixes bugs and security holes: install the binaries and restart.

solid answer

~40 s

Since version 10 a PostgreSQL version has two parts: in `18.6`, 18 is the major and 6 the minor. Before 10 the major was two numbers, so `9.5` to `9.6` was a major upgrade. A new major ships about once a year, in the autumn, with new features, user-visible incompatibilities listed under "Migration" in the release notes, and an internal data format that may change; reaching it takes a dump and restore, `pg_upgrade` or logical replication. Minor releases come at least quarterly, carry only bug and security fixes and never change the storage format, so you install the new binaries and restart the server: the data directory stays as it is and `pg_upgrade` is not needed. Minors are cumulative, so 18.1 can go straight to 18.6, and each major gets them for five years.

go deeper

for a junior

Recall the two-part number since 10, that minors are fix-only and applied by swapping binaries and restarting, and that majors need a real migration.

for a middle

Explain why minors are safe to apply in place: the storage format is frozen within a major. Mention that minors are cumulative but each skipped one's migration notes still apply.

for a senior

Show you treat a minor as a production change: read the notes for post-update steps, plan the restart around standbys, and verify the running version afterwards, not just the package.

for a principal

Frame the cadence as a planning input: a yearly major and five-year support means a major-upgrade project every few years, and minors as a routine quarterly change with an owner.

## How PostgreSQL numbers its releases Since PostgreSQL 10 a version number has two parts. In `18.6`, **18** is the **major version** and **6** is the **minor version**: the sixth bug-fix release of major 18. Before 10 the major was the first *two* numbers, so `9.5` and `9.6` were different majors and `9.6.3` was the third minor of 9.6. That older scheme is why people misread 9.5 to 9.6 as a small step; it was a full major upgrade. The running server reports both parts: `SHOW server_version` returns text such as `18.6`, and the preset parameter `server_version_num` returns the integer `180006` (major times 10000 plus minor). ## Minor releases: fixes only, same on-disk format A **minor release** contains bug fixes and security fixes for one major. The manual's rule is that minor releases **never change the internal storage format** and are compatible with earlier and later minors of the same major. That makes applying one short: 1. Install the new binaries, usually through the distribution's or the PostgreSQL project's packages. 2. Stop the server and start it again, so the new program is the one running. Until then the old code keeps running, whatever is on disk. 3. Do whatever the release notes' "Migration to Version 18.x" section asks, which is often nothing. The data directory is not converted, `initdb` is not run and `pg_upgrade` is not needed; its own documentation says it is not required for minor upgrades. Minor releases are **cumulative**: 18.6 contains every fix in 18.1 to 18.4, so you can go from 18.1 to 18.6 in one step, provided you read the migration notes of each release you skip. There was no 18.5: it was withdrawn after a regression was found post-wrap, so 18.4 is followed by 18.6. The cost of a minor update is a **restart**: every session is disconnected and the server is unavailable while it shuts down and starts again. ## Major releases: new features, format free to change A **major release** is where new features, new catalog columns, changed defaults and removed features land. Its internal data format may differ from the previous major, so the new binaries cannot simply be pointed at the old data directory. Moving to a new major is a **migration**: a dump and restore, `pg_upgrade`, or a cutover through logical replication, each with its own downtime and risks, which the major-version migration topic covers. Majors also bring **user-visible incompatibilities**, listed in the "Migration to Version 18" section of the release notes; in 18, for example, `initdb` enables data checksums by default and MD5 passwords are deprecated. Applications therefore need testing before a major, and the manual advises reading the notes of every intervening major when you jump several. ## Cadence and support side by side | | Major release | Minor release | |---|---|---| | How often | About once a year, in the autumn (17.0: 2024-09-26; 18.0: 2025-09-25) | At least quarterly, plus out-of-cycle releases for urgent fixes | | Contents | New features and incompatibilities | Bug and security fixes | | On-disk format | May change | Never changes | | How to apply | Dump/restore, `pg_upgrade` or logical replication | Replace binaries, restart | | Testing effort | Full application testing | Read the Migration section; usually light | Each major receives minor releases for **five years** from its first release, then one final minor, after which it is **end of life**. Several majors are therefore supported at once, and a fix is normally released for all affected ones on the same day: 18.6, 17.11, 16.15, 15.19 and 14.24 shipped together on 2026-08-13. ## Mistakes interviewers listen for - Calling 9.5 to 9.6 a minor upgrade because only the last digit changed. - Planning `pg_upgrade` or a dump to apply a minor release. - Assuming a package install alone patches the server; the old program keeps running until the restart. - Calling `pg_reload_conf()` after installing binaries: a reload re-reads configuration files, it does not load new code. - Treating minors as feature releases. They are fix releases, although a security fix occasionally brings a new setting (18.6 added `output_plugin_libraries` to restrict logical-decoding plugins), which is one more reason to read the notes. - Leaving minors unapplied for years because they look small. Minors carry security fixes and corruption fixes, and some ask you to reindex; running the latest minor of your major is the expected baseline.

  • Can you skip PostgreSQL minor releases, for example go from 18.1 straight to 18.6?
    Yes. Minors are cumulative, so installing 18.6 brings every fix since 18.0. What you must not skip is reading: each skipped release's "Migration to Version" section may ask for a post-update step. 18.6's notes point anyone coming from before 18.2 to the 18.2 notes, which ask to reindex indexes on `ltree` columns. 18.5 was never released, so there is nothing to read for it.
  • Why did PostgreSQL go from 9.6 to 10 rather than 9.7?
    With version 10 the project switched to two-part numbers. Under the old scheme the first two numbers formed the major, so 9.5 and 9.6 were separate majors with possibly different on-disk formats, and 9.6.3 was a minor. The three-part form made full major upgrades look like small steps. Since 10, the first number alone is the major and the second is the minor.
  • Does applying a PostgreSQL minor release need any downtime?
    Yes, a restart: the postmaster has to stop and start on the new binaries, which disconnects every session for the length of a shutdown and a startup. On a standalone server that is the outage. With streaming standbys you can update standbys first and keep the primary's outage short, or switch over to an already updated standby, but some server always restarts.

A minor release is a corrected reprint of the same book edition: typos are fixed but every page stays where it was, so your bookmarks still work. A major release is a new edition with re-set pages, so every bookmark has to be moved before you can use the new copy.

  • Going from 18.4 to 18.6 needs pg_upgrade or a dump and restore.
  • 9.5 to 9.6 was a minor upgrade because only the last digit changed.
  • A minor release can be picked up with pg_reload_conf(), without a restart.
  • Minor releases are where new SQL features ship between majors.
  • Installing the new packages patches the running server immediately.
open as a page

Why can't PostgreSQL 18 binaries start on a data directory initialized by PostgreSQL 17, and what are the three routes to a new major version?

level: juniorimportance: must knowfreq 62%

basics

~20 s

A major release may change the system-catalog layout, so the server refuses a data directory from another major. The routes are dump and restore, pg_upgrade, which rebuilds the catalogs and reuses the data files, and a logical-replication cutover.

open as a page

In PostgreSQL 18's pg_upgrade, how do the copy, link, clone, copy-file-range and swap modes differ in speed, disk use and the way back?

level: middleimportance: must knowfreq 55%

basics

~20 s

Copy, the default, duplicates files and keeps the old cluster intact; link hard-links them, fast, but the old cluster dies once the new starts; clone and copy-file-range share blocks where supported; 18's swap moves directories, destroying the old cluster.

open as a page

In PostgreSQL, how do you check which server version you are connected to, and why might version() still report 18.4 after 18.6 packages were installed?

level: middleimportance: should knowfreq 46%

basics

~20 s

Use SELECT version() or SHOW server_version to read it, and server_version_num (180006 for 18.6) in scripts. If version() still shows 18.4 after the 18.6 packages went in, the server has not been restarted and is still running the old code.

open as a page

A PostgreSQL minor update is meant to be a binary swap and restart; what can its release notes still require, with 18.x examples?

level: middleimportance: should knowfreq 30%

basics

~20 s

A PostgreSQL minor's Migration section can still ask you to reindex indexes the old code built wrongly, run ANALYZE, clean affected data or change configuration; 18.6 added output_plugin_libraries, which blocks third-party logical decoding plugins until they are listed.

open as a page

In October 2026, which PostgreSQL major versions still receive minor releases, and what does end of life mean for a server still on PostgreSQL 13?

level: middleimportance: should knowfreq 40%

basics

~20 s

Each PostgreSQL major gets minor releases for five years, then one final minor. In October 2026 that means 14 to 18, with 14's final minor due in November 2026. PostgreSQL 13 had its last minor in November 2025 and gets no more fixes.

open as a page

What does PostgreSQL's pg_upgrade --check verify, and why run it days before the window against the still-running old server?

level: middleimportance: should knowfreq 48%

basics

~20 s

pg_upgrade --check runs the upgrade's compatibility checks without changing any data: control-data settings, blocked data types, prepared transactions, missing extension libraries and more. It works against the live old server, so blockers surface days ahead instead of mid-outage.

open as a page

A PostgreSQL security minor release lands and you run 20 self-managed 18.x servers, primaries with streaming standbys: how do you roll it out safely, and in what order?

level: seniorimportance: should knowfreq 36%

basics

~20 s

Read the notes for every skipped minor, canary first, then in each cluster update standbys before the primary, restart each, keep the mixed-version window short, run the post-update steps and confirm server_version_num on all 20 servers.

open as a page

Upgrading a PostgreSQL 14 cluster to 18, pg_upgrade --check stops with 'old cluster does not use data checksums but the new one does'. Why, and what are your options?

level: seniorimportance: should knowfreq 38%

basics

~20 s

Since PostgreSQL 18, initdb enables data checksums by default, and pg_upgrade requires both clusters to match. Re-run initdb for 18 with --no-data-checksums, or enable checksums on the old cluster offline with pg_checksums --enable before upgrading.

open as a page

Moving a 3 TB PostgreSQL 14 e-learning database to 18 through logical replication with seconds of downtime, what is the cutover sequence and what does replication not carry?

level: seniorimportance: should knowfreq 40%

basics

~20 s

Load roles and schema into 18, subscribe it to 14 and freeze DDL; at cutover stop writes, wait until the final LSN is confirmed, setval the sequences and repoint clients. DDL, sequence values, large objects and materialized views are not replicated.

open as a page

After pg_upgrade from PostgreSQL 14 to 18, which planner statistics arrive with the data, which do not, and what do you run before reopening traffic?

level: seniorimportance: should knowfreq 42%

basics

~10 s

PostgreSQL 18's pg_upgrade carries most per-column and per-table planner statistics, but not extended statistics, extension-made statistics or cumulative activity counters. Run vacuumdb --all --analyze-in-stages --missing-stats-only, then vacuumdb --all --analyze-only.

open as a page