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?
answer
- two numbers since version 10
- on-disk format: frozen or free to change
- binaries out, data directory stays
- yearly majors, quarterly minors
basics
~20 sA 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 sSince 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
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.
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.
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.
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.