Performing a minor version upgrade is a simple process, this type of upgrade only requires to upgrade the executable files (binaries) while the server is down. Once the files were replaced the server must be restarted.
Minor releases never change the internal storage format and are always compatible with earlier and later minor releases of the same major version number. For example, version 10.1 is compatible with version 10.0 and version 10.6. Similarly, check the official Postgres documentation.
You can also perform a minor version upgrade without creating an SGDbOps by using the rollout functionality. Simply change the
SGCluster.spec.postgres.versionfield to the target version and let the operator roll out the update based on the cluster’s update strategy. You can also set a version alias such as16(latest minor for major 16) orlatest(latest available version) to automatically track new minor releases without manual intervention.
StackGres simplify the process to perform a minor version upgrade providing two different methods to accomplish this, using the Web Console or by the kubectl CLI.
In order to execute the process by using the CLI, you need to create the SGDbOps manifest. In the next example a minor version upgrade from Postgres version 16.1 to 16.2 will be performed:
To execute the process create and apply the manifest with the next command:
apiVersion: stackgres.io/v1
kind: SGDbOps
metadata:
name: minor-v-upgrade
namespace: default
spec:
minorVersionUpgrade:
method: InPlace
postgresVersion: "16.2"
op: minorVersionUpgrade
sgCluster: demo
Check each specific parameter on the manifest, they are all the same that you can specify when using the Web Console.
Once you apply the manifest you can check the operation status with:
❯ kubectl get sgdbops.stackgres.io minor-v-upgrade
NAME CLUSTER OPERATION STATUS
minor-v-upgrade demo minorVersionUpgrade OperationRunning
You can check the operation log by checking the pods logs:
❯ kubectl logs minor-v-upgrade-g7jf8
StackGres already provides a Database Operation called Minor Version Upgrade
Database Operations
Click over the Plus (+) button
Then the Create Database Operation page will be open.

Choose your target cluster
You can set the process to be executed at a specific time, if not set the process will be executed immediately.
If required you can add the Node Tolerations.
Choose the method:
Finally click on Create Operation
All the operations executed to perform the minor version upgrade will be shown in the Database Operation detail.
