Skip to main content
PGO upgrades fall into two separate concerns: upgrading the operator itself (new PGO release), and upgrading the Postgres major version running inside your clusters. These are independent operations with different procedures. You can upgrade the operator without touching Postgres, and you upgrade Postgres using the PGUpgrade custom resource regardless of how you installed the operator.
Before any upgrade, read the release notes for the target PGO version. Breaking changes and required manual steps are called out explicitly in the changelog.

Upgrade the operator

The operator upgrade process re-applies updated manifests. Because PGO uses a Recreate deployment strategy (not RollingUpdate), the old pod is terminated before the new one starts. This means there is a brief window during which the operator is not running. Existing Postgres clusters are not affected — they continue serving traffic while the operator is offline.
1

Pull the latest changes in your examples fork

2

Review the diff before applying

Preview what will change before touching the cluster:
Pay attention to any CRD schema changes — these apply immediately and affect all clusters.
3

Apply the updated manifests

Use the same --server-side flag you used during the initial install:
Kubernetes performs a server-side apply merge, so only changed fields are updated.
4

Watch the operator pod roll

5

Confirm the new version

The image tag should reflect the new PGO version.

Backward compatibility

PGO follows semantic versioning for its operator releases:
  • Patch releases (e.g., 5.6.0 → 5.6.1): backward-compatible bug fixes. Safe to apply without reviewing cluster behavior.
  • Minor releases (e.g., 5.5.x → 5.6.x): backward-compatible new features. CRD schemas may be extended with new optional fields. Existing clusters are unaffected.
  • Major releases (e.g., 5.x → 6.x): may include breaking changes to the CRD API, RBAC, or default behavior. Always read the migration guide in the release notes before upgrading.
Downgrading the operator is not supported. If an upgrade introduces a problem, restore from a backup of your cluster data rather than rolling the operator back.

Upgrade Postgres major versions

Upgrading the Postgres major version (for example, from Postgres 15 to Postgres 16) requires an in-place pg_upgrade. PGO handles this through the PGUpgrade custom resource, which orchestrates a controlled shutdown, data upgrade, and restart of your cluster.
The PGUpgrade resource upgrades the Postgres data directory in place. This is separate from upgrading the PGO operator itself and can be done independently.

How PGUpgrade works

When you create a PGUpgrade resource that references an existing PostgresCluster:
  1. PGO shuts down the cluster gracefully.
  2. The upgrade job runs pg_upgrade to convert the data directory from the old Postgres major version format to the new one.
  3. PGO restarts the cluster with the new Postgres version image.
  4. The cluster resumes serving traffic.

Example PGUpgrade resource

Apply the resource:

Watch the upgrade progress

Once the PGUpgrade reaches Succeeded, the cluster is running on the new Postgres version. Verify by checking the cluster status:

Update the PostgresCluster spec

After a successful upgrade, update your PostgresCluster manifest to reflect the new Postgres version so that future reconciliations use the correct image:
Apply the change:
The PGUpgrade resource performs an in-place upgrade. Ensure you have a current pgBackRest backup of your cluster before starting. See Backups for how to trigger a manual backup.

PGUpgrade prerequisites

  • The target Postgres version image must be listed as a RELATED_IMAGE_POSTGRES_* environment variable in the operator Deployment. These are set automatically when you install or upgrade PGO via the provided overlays.
  • The cluster must be in a healthy state before the upgrade starts (primary running, all replicas caught up).
  • Remove any extensions that are not available in the target Postgres version before upgrading.
For the full PGUpgrade API reference, see PGUpgrade reference.

Next steps

Update Postgres minor versions

Roll out Postgres patch releases to your clusters with minimal downtime.

Backups

Take a manual backup before any upgrade operation.

PGUpgrade reference

Full API reference and field descriptions for the PGUpgrade resource.

Supported platforms

Check which Kubernetes versions and distributions PGO supports.