Resize storage volumes
PostgreSQL instance storage is defined bydataVolumeClaimSpec (and optionally walVolumeClaimSpec) inside each instances entry. To increase the volume size, update the resources.requests.storage value and apply the change.
PersistentVolumeResizing condition on the PostgresCluster status:
WAL volume
If you configured a separate WAL volume usingwalVolumeClaimSpec, resize it the same way:
Automatic volume growth
PGO includes anAutoGrowVolumes feature gate (alpha, enabled by default) that can automatically expand volumes before they run out of space, eliminating the need for manual intervention.
To configure auto-grow, add an autoGrow stanza inside dataVolumeClaimSpec or walVolumeClaimSpec. Auto-grow requires that the PVC has a storage limit set.
AutoGrowSpec fields
The
AutoGrowVolumes feature gate is alpha-stage but enabled by default. If you need to disable it, set AutoGrowVolumes=false in the operator’s feature gate configuration. See Feature Gates.Resize compute (CPU and memory)
CPU and memory for PostgreSQL instance pods are controlled by theresources field inside each instances entry. This follows the standard Kubernetes ResourceRequirements structure.
Control disruption with minAvailable
UseminAvailable to ensure a minimum number of pods remain healthy during a rolling restart:
Changes that do not restart pods
The following storage-related changes do not cause pod restarts:- Increasing
dataVolumeClaimSpec.resources.requests.storage(volume expansion only, no pod restart when the StorageClass supports online resizing) - Modifying
autoGrow.triggerorautoGrow.maxGrow
- Updating
resources(CPU/memory) on an instance set - Changing
dataVolumeClaimSpec.storageClassName - Adding or removing a
walVolumeClaimSpec - Changing
affinity,tolerations, ortopologySpreadConstraints
Next steps
Upgrade PostgreSQL versions
Perform minor and major version upgrades on your cluster.
Customize cluster configuration
Tune postgresql.conf parameters and pod scheduling constraints.