TechBuzzPro

PostgreSQL Release & Support Cycles for Upgrade Planning

· 7 min read · Apps & Browsers

In this article
  1. How PostgreSQL Versioning Works
  2. The Five-Year Support Window
  3. Minor Releases and Their Urgency
  4. Why Upgrade Planning Matters
  5. How to Perform a Major Upgrade
  6. Common Upgrade Pitfalls and How to Avoid Them
  7. How to Choose the Right Upgrade Target
  8. Frequently Asked Questions

PostgreSQL releases a new major version roughly every year, and each major version is supported for five years from its initial release. Understanding this release and support cycle is the foundation of any upgrade plan, because it tells you exactly how long you have to test and deploy a new version before the one you are running stops receiving fixes.

How PostgreSQL Versioning Works

PostgreSQL uses a two-part version number: a major version and a minor version. For example, in PostgreSQL 16.4, the major version is 16 and the minor version is 4. Major versions add new features and can change behavior, while minor versions contain only bug fixes and security patches. Minor releases do not add features and are designed to be safe to apply without changing your application's behavior.

The project releases a new major version every year, typically in late September or early October. The most recent major versions are 16 (released September 2023), 15 (October 2022), and 14 (September 2021). Each major version is supported for five years from its initial release, which means you get about five years of minor releases with bug and security fixes.

The Five-Year Support Window

The PostgreSQL Global Development Group (PGDG) commits to supporting each major version for five years. This policy is documented on the official PostgreSQL versioning policy page. After the five-year window ends, no more minor releases are produced for that major version, even if critical security vulnerabilities are discovered later. This is a firm deadline: if you are running an unsupported version, you will not receive patches for newly found security issues.

Here is how the schedule looks for recent versions (as of early 2025):

  • PostgreSQL 16: released September 2023, supported until September 2028
  • PostgreSQL 15: released October 2022, supported until October 2027
  • PostgreSQL 14: released September 2021, supported until September 2026
  • PostgreSQL 13: released September 2020, supported until September 2025
  • PostgreSQL 12: released October 2019, supported until October 2024 (already EOL)

Note that the support window begins at the initial release of the major version, not when you install it. If you adopt a version a year after its release, you have four years of support left, not five.

Minor Releases and Their Urgency

Minor releases are issued roughly every three months, though the schedule can vary. They contain bug fixes, security patches, and occasionally small improvements that do not change behavior. The PostgreSQL project strongly recommends applying minor releases as soon as possible, because they often address security vulnerabilities that could be exploited.

For example, the minor release 16.4 (August 2024) fixed several security issues, including a privilege escalation vulnerability. Waiting to apply a minor release leaves your system exposed to known attacks. Unlike major upgrades, minor upgrades are straightforward: you install the new binaries, restart the server, and run the same database files. There is no dump/restore or pg_upgrade needed for minor releases.

Why Upgrade Planning Matters

Upgrading PostgreSQL is not something you want to do in a panic when your version reaches end-of-life. A well-planned upgrade gives you time to test your applications, adjust configurations, and handle any breaking changes. The consequences of ignoring the support cycle include:

  • No security patches for newly discovered vulnerabilities, leaving your data at risk
  • No bug fixes for issues that affect your workload
  • Inability to get support from the community or commercial vendors, who often require a supported version
  • Potential compatibility problems with newer tools and extensions that drop support for old versions

For example, if you are running PostgreSQL 12 (EOL since October 2024) and a critical vulnerability is announced in 2025, you will have no official fix. You would have to either upgrade immediately or accept the risk. Planning ahead avoids this situation.

How to Perform a Major Upgrade

PostgreSQL provides two main tools for major upgrades: pg_upgrade and logical replication. Both have their place, and your choice depends on your environment and tolerance for downtime.

pg_upgrade is the fastest method for in-place upgrades. It works by creating new data files in the new version's format and linking or copying the old data. The process requires downtime, but it can be quite short for large databases. The basic steps are:

  1. Install the new PostgreSQL version on the same server (or a staging server).
  2. Stop the old server cleanly.
  3. Run pg_upgrade with the appropriate options, pointing to the old and new data directories.
  4. Start the new server and run the recommended post-upgrade checks.

Logical replication (using pglogical or built-in logical replication) allows you to set up a new server running the new version and continuously replicate data from the old server. When you are ready, you switch your applications to the new server. This method minimizes downtime but requires more setup and can be slower for very large databases.

Before any upgrade, you should:

  • Read the release notes for the new major version to identify breaking changes.
  • Test the upgrade in a staging environment that mirrors your production setup.
  • Back up your database completely, using pg_dump or a filesystem-level backup.
  • Check for deprecated features and settings that may have been removed.

Common Upgrade Pitfalls and How to Avoid Them

Even with planning, upgrades can hit snags. Here are the most common issues and how to handle them:

  • Breaking changes in SQL syntax or behavior. Each major version may change default settings or remove deprecated features. For example, PostgreSQL 16 changed the default for log_directory to log, and PostgreSQL 15 removed the public schema write privilege for non-owners. Always review the release notes.
  • Extension incompatibility. Third-party extensions may not yet support the new major version. Check the extension's documentation before upgrading. If an extension is not compatible, you may need to wait or find an alternative.
  • Disk space issues. pg_upgrade requires roughly the same amount of disk space as your current data directory, plus room for the new cluster. Ensure you have enough free space before starting.
  • Forgotten configuration changes. Your postgresql.conf and pg_hba.conf files are not automatically migrated. You need to copy your custom settings to the new cluster's configuration files.

How to Choose the Right Upgrade Target

When planning an upgrade, you should aim for a version that gives you the longest support runway. As of early 2025, the best choices are:

  • PostgreSQL 16 – the latest major version, supported until 2028. Ideal for new deployments and upgrades.
  • PostgreSQL 15 – still well-supported until 2027, but you will need to upgrade again sooner.

If you are currently on version 12 or 13, you are either at end-of-life or close to it. Upgrading directly to 16 is generally recommended, as the jump is manageable and gives you the most time before the next upgrade. If you have a very large database and want to minimize risk, you could upgrade to 14 first (supported until 2026) and then to 16 later, but that doubles the work. Most teams prefer to do a single jump to the latest version, provided they test thoroughly.

Frequently Asked Questions

How long is PostgreSQL supported?

Each major version is supported for five years from its initial release. During that time, minor releases are issued regularly with bug fixes and security patches. After the five-year mark, no more releases are made for that version.

Can I skip major versions when upgrading?

Yes, PostgreSQL supports upgrading directly from any version that is not too old. For example, you can upgrade from PostgreSQL 12 to 16 in one step using pg_upgrade. However, you must ensure that your extensions and applications are compatible with the target version. Skipping versions is common and safe if you test properly.

What is the difference between a major and minor release?

A major release (e.g., 16) adds new features and may change behavior. A minor release (e.g., 16.4) contains only bug fixes and security patches, with no new features. Minor releases are designed to be drop-in replacements; major releases require careful planning and testing.

Do I need to pay for PostgreSQL support?

No, PostgreSQL is open source and free to use. The community provides support through mailing lists and forums. However, many organizations choose to purchase commercial support from vendors like EDB or Percona. These vendors typically require you to run a supported version, so the five-year cycle still applies.

How often are minor releases issued?

Minor releases are typically issued every three months, but the schedule can vary. The PostgreSQL project announces them on the official website and mailing lists. You should subscribe to these announcements to stay informed about security fixes.

What happens if I ignore the end-of-life date?

If you continue to run an unsupported version, you will not receive any more minor releases. This means no security patches for newly discovered vulnerabilities, leaving your database exposed. You also may not be able to get help from the community or commercial vendors, as they focus on supported versions.