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 aRecreate 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.
- Kustomize
- Helm
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 Kubernetes performs a server-side apply merge, so only changed fields are updated.
--server-side flag you used during the initial install:4
Watch the operator pod roll
5
Confirm the new 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.
Upgrade Postgres major versions
Upgrading the Postgres major version (for example, from Postgres 15 to Postgres 16) requires an in-placepg_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 aPGUpgrade resource that references an existing PostgresCluster:
- PGO shuts down the cluster gracefully.
- The upgrade job runs
pg_upgradeto convert the data directory from the old Postgres major version format to the new one. - PGO restarts the cluster with the new Postgres version image.
- The cluster resumes serving traffic.
Example PGUpgrade resource
Watch the upgrade progress
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 yourPostgresCluster manifest to reflect the new Postgres version so that future reconciliations use the correct image:
PGUpgrade prerequisites
- The target Postgres version image must be listed as a
RELATED_IMAGE_POSTGRES_*environment variable in the operatorDeployment. 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.
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.