Replies: 3 comments 1 reply
|
The process for upgrading a cluster with custom parameter groups is tricky and a multi-step process. Step 1.
Note, you must keep the old ones, keep them attached to your cluster, and do not change the version on the cluster! Step 2
Step 3
Step 4
Step 5 Cleanup!..
|
|
For RDS major upgrades with custom parameter groups, the important part is that the parameter group family must match the target engine family. I would not mutate the old parameter group in place. Create new target-version parameter groups first, then switch to them as part of the upgrade plan. A safer sequence is:
The thing to avoid is a CDK diff that mixes “rewrite parameter group family”, “reattach parameter group”, and “upgrade engine” in a way CloudFormation cannot order safely. In CDK I would model the target parameter group as a new resource with a stable id/name, not as a replacement of the old one. That makes the plan and rollback much easier to reason about. |
|
For major RDS/Aurora upgrades with custom parameter groups, the safe path is a staged deploy, not an in-place family mutation. What usually works reliably is:
In CDK terms, keep both old and new groups around temporarily: var pg15Cluster = new ParameterGroup(...); // current family
var pg16Cluster = new ParameterGroup(...); // target family
var cluster = new DatabaseCluster(this, "Db", DatabaseClusterProps.builder()
.engine(DatabaseClusterEngine.auroraPostgres(
AuroraPostgresClusterEngineProps.builder()
.version(AuroraPostgresEngineVersion.VER_16_1)
.build()))
.parameterGroup(pg16Cluster)
.writer(ClusterInstance.serverlessV2("writer",
ServerlessV2ClusterInstanceProps.builder()
.parameterGroup(pg16Instance)
.build()))
.build());Two gotchas:
I’d also test the exact sequence on a restored snapshot first, because “engine upgrade + custom parameter group swap” is where most surprises show up. |
Uh oh!
There was an error while loading. Please reload this page.
I have created a database cluster with CDK, created a PostgreSQL 15.4 cluster. I created a custom parametergroup like this (java)
When I change the config to use version 16.1 instead deploying the stack throws an error:
The question is: how can I realize a major version upgrade by updating the stack (configuration)? I tried to add a configuration item with a boolean to indicate a major version upgrade, and in that case create a new parameter group, but that does not seem to help me very much.
All reactions