Chapter 01 · PostgreSQL Foundations, Release Cadence, Installation, and Lab Design

Major Releases, Minor Releases, Support Policy, Compatibility, and Upgrade Planning

Plan PostgreSQL maintenance and upgrades by separating major releases, minor updates, support windows, server/client/extension compatibility, and application-level behavior.

Intermediate80–100 minutesLifecycle + compatibility planning labCurrent patched PostgreSQL 18.xOfficial release/support policyLast reviewed: August 2026

Learning outcomes

Suppose ServiceHub is running well on PostgreSQL 18 and an administrator sees two different notices: one announces a new PostgreSQL 18 maintenance release, while another announces a PostgreSQL 19 beta. Treating both as “new versions” would produce very different operational decisions. A minor update inside major version 18 preserves the PostgreSQL on-disk storage format; moving from major 18 to major 19 is a major-version migration with compatibility work and a different rollback story.

PostgreSQL’s release model is deliberately predictable, but production planning still requires evidence. You need to know which server is running, which client and tools are installed, which extensions and drivers depend on the major version, when support ends, and whether application behavior has changed.

01

Read PostgreSQL version numbers correctly for version 10 and later, distinguishing major and minor releases.

02

Explain the annual major-release cadence, maintenance-release cadence, and five-year major support policy.

03

Separate a minor update from a major upgrade and identify the data, extension, tool, and application compatibility checks each requires.

04

Inventory server, psql, extension, and relevant client-library versions with observable evidence.

05

Build an upgrade-readiness record instead of relying on a version string alone.

Baseline discipline

This course uses the current patched PostgreSQL 18.x line as the mandatory stable-major baseline. At lesson-generation time, official project pages identify PostgreSQL 18 as the current stable major and PostgreSQL 19 as a pre-release development series. Before installing or patching, always re-check the live PostgreSQL versioning, release-note, roadmap, and security pages for the exact current minor release.

1. Version numbers since PostgreSQL 10

Starting with PostgreSQL 10, the first number is the major version. In 18.4, for example, 18 is the major version and 4 identifies a minor maintenance release in that major line. A change from 18.x to 19 is therefore a major upgrade. A change from one 18.x maintenance level to a later 18.x maintenance level is a minor update.

Older PostgreSQL releases used a three-part convention, which is why old documentation may talk about a “major version” such as 9.6 and a minor release such as 9.6.24. Do not apply that historical numbering rule to modern releases.

sql · ask the connected server for its version
SHOW server_version;SHOW server_version_num;SELECT version();

server_version is human-readable. server_version_num is useful when software needs a comparable integer representation, but application code should still avoid making unsupported assumptions about features solely from a number. Extension availability, configuration, privileges, and provider restrictions can matter too.

terminal · identify the client separately
psql --versionpg_dump --versionpg_restore --version

Those commands report client-tool binaries on the machine where they run. They do not prove the remote server’s version. This separation becomes especially important during major upgrades, where the version of pg_dump, pg_restore, and pg_upgrade matters.

2. Major releases deliver features; minor releases deliver fixes

The PostgreSQL Global Development Group normally publishes a new major version about once a year. Major versions introduce new features and can change behavior or compatibility. Each major is then maintained with bug fixes and, when necessary, security fixes through minor releases. The project targets at least quarterly minor releases and may publish an out-of-cycle update when an important fix should not wait.

Change Typical purpose Storage compatibility Planning level
18.x → later 18.x Bug and security fixes within major 18 Internal storage format remains compatible within the major line Patch/update procedure, restart as packaging requires, regression smoke tests
18.x → 19 New major features plus accumulated fixes Do not point the new major server directly at the old major’s data directory Major-upgrade project: pg_upgrade, dump/restore, or replication-based migration
18.x → 19 beta/RC Pre-release testing Development/testing only Disposable test environment, never the course production baseline

A minor release is not “optional because it has no features.” PostgreSQL security fixes are delivered in minor updates, and the project recommends running the latest minor release available for the chosen supported major. Production teams still apply their normal change-management and validation process because any binary change deserves an operational check.

3. Five years of support is a planning boundary

Each PostgreSQL major version is supported for five years after its initial release. At end of life, the project stops publishing fixes for that major. That means an organization should not wait for the final supported day before designing its next upgrade. Extensions, operating-system packages, drivers, managed services, and internal certification cycles may impose earlier practical deadlines.

Major Initial release Project support ends Course interpretation
18 September 25, 2025 November 14, 2030 Current stable-major course baseline
17 September 26, 2024 November 8, 2029 Supported older major; useful for upgrade practice
16 September 14, 2023 November 9, 2028 Supported older major
15 October 13, 2022 November 11, 2027 Supported older major
14 September 30, 2021 November 12, 2026 Supported at this lesson’s review date, but near end of support

These dates are planning evidence, not permanent constants. The live PostgreSQL Versioning Policy page is authoritative. Future readers should re-check it because this lesson is a snapshot reviewed in August 2026.

4. Why minor updates are operationally simpler

PostgreSQL minor releases within one major line keep the internal storage format compatible. That means a minor update does not require a logical dump/reload or pg_upgrade simply because the patch number changed. Package managers or installers typically replace binaries and restart the server according to the local distribution’s procedure.

“Storage-compatible” does not mean “zero work.” Read the release notes, take or verify a recovery point appropriate to the service, confirm replication/topology compatibility, patch replicas and primaries in a safe order for your architecture, restart when required, and run application smoke tests. If an extension ships native libraries, it can have its own package update and restart requirements.

sql · create a pre-patch identity record
SELECT version() AS server_build;SELECT current_database(), current_user;SELECT extname, extversionFROM pg_catalog.pg_extensionORDER BY extname;SELECT name, setting, source, pending_restartFROM pg_catalog.pg_settingsWHERE name IN ('shared_preload_libraries', 'wal_level', 'max_connections')ORDER BY name;

Save comparable output after the update. This does not replace full testing, but it gives you an auditable before/after identity record instead of the weak statement “the service came back up.”

5. Major upgrades cross a physical compatibility boundary

A PostgreSQL major upgrade may change the internal representation of database data. The supported migration families are therefore explicit: logical dump/restore, pg_upgrade, or replication-based approaches where appropriate. Which path is best depends on database size, downtime budget, operating-system/platform changes, extension support, rollback requirements, and topology.

Never stop PostgreSQL 18, install PostgreSQL 19, and point the 19 server directly at the old 18 PGDATA as though it were a minor update. The server checks the data directory’s major-version identity and refuses an incompatible directory rather than silently interpreting it as a newer format.

text · intentionally wrong major-upgrade idea
WRONG MENTAL MODEL1. Stop PostgreSQL 18.2. Replace the postgres executable with PostgreSQL 19.3. Start PostgreSQL 19 against the PostgreSQL 18 data directory.4. Hope the files are upgraded in place.SAFER MODELChoose and rehearse a supported migration method:- pg_upgrade- logical dump/restore- replication-based migration where the source/target combination supports itThen validate extensions, statistics, application behavior, and rollback/cutover plans.

Do not perform the wrong sequence merely to see the error. The lesson is about recognizing the unsupported plan before touching real data.

6. Compatibility has more than one layer

An upgrade can be physically valid and still break an application. PostgreSQL production planning needs several compatibility layers:

Layer Question to answer Evidence
Data directory Can the target server read the existing physical cluster? Same-major minor update, or supported major-upgrade method
Extensions Are server-side extension packages available for the target major and can installed versions be upgraded? pg_extension, pg_available_extension_versions, extension release notes
Client protocol/tools Are psql, pg_dump/restore, drivers, poolers, and monitoring agents compatible? Tool versions and each project’s official compatibility matrix
SQL/application Did reserved words, defaults, planner behavior, casts, functions, or semantics change? Major release notes plus application test suite
Operations Do backup, replication, failover, observability, and deployment procedures still work? Rehearsal, restore test, failover test, dashboards, runbooks

This is why “PostgreSQL upgraded successfully” should mean more than a green service status. The database must be correct, the application must work, and the recovery path must still be credible.

7. Inventory extensions before planning a target major

Extensions are database-local installations backed by server-visible extension packages. A major upgrade cannot assume that every package from the source major is already installed for the target major.

sql · extension readiness inventory
SELECT e.extname,       e.extversion AS installed_version,       a.default_version AS available_default_versionFROM pg_catalog.pg_extension AS eLEFT JOIN pg_catalog.pg_available_extensions AS a  ON a.name = e.extnameORDER BY e.extname;SELECT name, version, installed, superuser, trustedFROM pg_catalog.pg_available_extension_versionsORDER BY name, version;

The second query can return a long list. The point is not to install everything. It is to make extension dependencies explicit so the target environment can be built and tested before cutover.

Third-party discipline

PostgreSQL core’s five-year support policy does not automatically define the lifecycle of a third-party extension, pooler, driver, backup tool, HA orchestrator, or vendor distribution. Treat each component as an independently versioned dependency.

8. Client/server version differences: observe before assuming

psql and libpq are clients. They can connect over the PostgreSQL protocol to servers that are not the exact same maintenance release, and often not the same major release, but that does not make every client-side meta-command or administrative utility interchangeable across arbitrary versions. Backup/restore and major-upgrade tooling have stricter documented rules than a simple interactive query session.

terminal · collect client tool versions
psql --versionpg_dump --versionpg_restore --versionpg_isready --version
sql · collect server version in the same evidence bundle
SHOW server_version;SHOW server_version_num;SELECT version();

When troubleshooting, always say which side a version belongs to: “psql 18.x client connecting to PostgreSQL 18.x server,” rather than “we are on 18” with no component named.

9. A deliberately wrong approach: “latest means safest for production”

During a beta cycle, the largest version number visible on the PostgreSQL website can belong to a pre-release major. Beta and release-candidate builds exist so users and ecosystem developers can test upcoming behavior. They are not intended as production releases.

The repair is to choose a supported stable major, run its current patched minor release, and test the next major separately. For this chapter, that means PostgreSQL 18.x is the reproducible stable-major baseline while PostgreSQL 19 pre-release builds belong only in disposable compatibility experiments until general availability.

10. Hands-on lab: build a version and upgrade-readiness record

This lab changes nothing. Run it against a disposable PostgreSQL 18.x instance and save the result as a text artifact for future upgrade comparison.

Step 1 — server identity

sql · server identity report
SELECT now() AS observed_at,       version() AS server_build,       current_database() AS database_name,       current_user AS effective_role;SHOW server_version;SHOW server_version_num;SHOW data_directory;SHOW data_checksums;

Step 2 — installed database extensions

sql · installed extension report
SELECT extname, extversionFROM pg_catalog.pg_extensionORDER BY extname;

Step 3 — client tools

terminal · client identity report
psql --versionpg_dump --versionpg_restore --version

Step 4 — create a compatibility worksheet

Dependency Current Target Evidence needed before change
PostgreSQL server 18.x Later 18.x or future supported major Official release notes and support status
psql / libpq Record output Chosen client version Official client/tool documentation
Extensions Record extversion Target-compatible package/version Extension project release notes
Application driver Record package version Supported version Official driver compatibility documentation
Backup/restore Current procedure Rehearsed target procedure Successful restore test

Verification checklist

  • You can state server and psql versions separately.
  • You know whether the contemplated change is minor or major.
  • You have listed installed extensions rather than assuming none exist.
  • You can point to official release notes/support policy for the chosen target.
  • You have a rollback or recovery strategy appropriate to the change class.

Check your understanding

  1. In PostgreSQL 18.4, which number identifies the major version?
  2. Why does a minor update not require pg_upgrade merely because the patch number changed?
  3. What makes a PostgreSQL 18 → 19 migration fundamentally different?
  4. Why must extension compatibility be checked independently?
  5. Why should a beta release not become the mandatory production baseline?
Review the answers

18 is the major version. Minor releases preserve the storage format within a major line, whereas a new major can change physical format and requires a supported migration method. Extensions are separately packaged/versioned and might not be ready for the target major even when PostgreSQL core is. Beta releases are pre-release testing builds and can still contain serious bugs or incompatible changes, so stable supported releases belong in production baselines.

11. Summary and bridge to installation

PostgreSQL releases a new major roughly annually and maintains each major for five years with minor bug/security updates. Since PostgreSQL 10, a number such as 18.4 means major 18, minor 4. Minor updates stay within one physical storage format; major upgrades cross a compatibility boundary and require a supported migration technique.

Version planning is multi-layered: server binaries, data directory, psql/libpq and utilities, extensions, drivers, application SQL, and operational tooling all deserve explicit evidence. The next lesson turns that policy into a reproducible local environment by installing PostgreSQL 18.x on Windows, Linux, or Docker and verifying a real initialized database cluster.

Authoritative references

Keep knowledge open

Help the academy stay free and grow.

If these tutorials save you time, a small donation supports new lessons, technical review, diagrams, examples, and long-term maintenance.

ETHEthereum / ERC-20 only
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0

Send only assets compatible with the Ethereum/ERC-20 network. Do not send TRC-20/TRON assets.