We use serverless-framework and Postgresql.
Type: AWS::RDS::DBInstance
Properties:
EngineVersion: 11.8
It was 11.8 before, we successfully upgraded it from 11.8 to 11.9 by changing the version in serverless.yml in EngineVersion.
But now we need to upgrade it to 11.10 and we have the following issue:
The error message:
Cannot upgrade postgres from 11.9 to 11.1 (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: e0d1923a-cf98-44ea-a9e4-bc3871e33bf6; Proxy: null).
So it looks like it tries to upgrade to 11.1 rather than 11.10.
The 11.10 value you're specifying for the EngineVersion property is processed as a number by the YAML engine since you're not using quotes, so the trailing zeros are removed and the resulting value is 11.1. You need to specify the value in quotes, like this: "11.10"
It seems like Serverless ignores '0' in Engine Version that you are trying to set up.
Could you try to escape version with quotes?
It will look like this:
Type: AWS::RDS::DBInstance
Properties:
EngineVersion: '11.10'
It should help to solve the problem and upgrade version successfully
Related
Similar to Error creating DB Instance: InvalidParameterCombination: Cannot find version 5.6.10a for aurora-mysql but for Postgres, which has a different cause.
* error creating RDS Cluster (mycompany-pulumi-aurora-cluster) Instance: InvalidParameterCombination: Cannot find version 12.6 for aurora
status code: 400, request id: someid
But 12.6 is valid for Aurora PostgreSQL in that region:
$ aws rds describe-db-engine-versions --engine aurora-postgresql --query '*[].[EngineVersion]' --output text --region us-east-2
9.6.3
9.6.6
9.6.8
9.6.9
9.6.11
9.6.12
9.6.16
9.6.17
9.6.18
9.6.19
9.6.21
10.4
10.5
10.6
10.7
10.11
10.12
10.13
10.14
10.14
10.16
11.4
11.6
11.7
11.8
11.9
11.11
12.4
12.6
There's two simultaneous causes of this error:
Aurora versions are restricted based on the instance type
You need to specify the engineVersion for each cluster instance (as well as the cluster itself).
Resulting code (I'm using Pulumi, but the same logic applies for Terraform, raw CloudFormation etc).
const rdsCluster = new aws.rds.Cluster("default", {
clusterIdentifier: config.database.clusterName,
engine: "aurora-postgresql",
// Restricted based on https://docs.amazonaws.cn/en_us/AmazonRDS/latest/AuroraUserGuide/Concepts.DBInstanceClass.html#Concepts.DBInstanceClass.SupportAurora
engineVersion: "12.7",
databaseName: config.database.name,
masterUsername: config.database.username,
masterPassword: config.database.password,
dbSubnetGroupName: rdsSubnetGroup.name,
storageEncrypted: true,
});
// https://www.pulumi.com/docs/reference/pkg/aws/rds/clusterinstance/#engineversion_nodejs
const clusterInstances: Array<aws.rds.ClusterInstance> = [];
for (let range = 0; range < config.database.instanceCount; range++) {
clusterInstances.push(
new aws.rds.ClusterInstance(`clusterInstances-${range}`, {
identifier: `aurora-cluster-demo-${range}`,
clusterIdentifier: rdsCluster.id,
instanceClass: config.database.instanceType,
// Engine must be specified otherwise AWS will give a misleading error about DB versions not being available.
// https://github.com/hashicorp/terraform-provider-aws/issues/2419#issuecomment-347060274
engine: "aurora-postgresql",
engineVersion: "12.7",
})
);
}
I did an upgrade from Postgres 11.6 to 12.2 on AWS-RDS. Post upgrade seeing a couple of issues:
Seems like all reltuples were set to 0 post upgrade
Describe of an object results in error:
ERROR: column c.relhasoids does not exist
LINE 1: ...riggers, c.relrowsecurity, c.relforcerowsecurity, c.relhasoi...
It is well known and well documented that stats are not carried over and so you need analyze your database after pg_upgrade.
I recently upgraded my Amazon PostgreSQL RDS to version 10.3 but while fetching the projections I am getting error:
ERROR: transform_geom: couldn't parse proj4 output string: '3857': projection not named
CONTEXT: SQL function "st_transform" statement 1
Same records i am able to fetch prior to version 9.5.xx
My PostGIS version is 2.4.2 which is compatible to RDS intance.
I perhaps faced the same problem after upgrading from postgis 2.2 to 2.3, some of my queries did no work anymore.
Old-query:
SELECT ST_X(ST_TRANSFORM(ST_SETSRID(ST_MAKEPOINT($1,$2),$3),$4));
query-params $1...$4:
602628,6663367,3857,3857
error message:
"transform_geom: couldn't parse proj4 output string: '3857': projection not named"
Reason:
ST_TRANSFORM comes in multiple flavours, two of them:
public.st_transform(geometry, integer)
public.st_transform(geometry, text)
Latter one, I assume new in postgis 2.3, caused my problem, because $4 (3857) was regarded as (proj4-) string and not as (SRID-) integer.
Workaround in my case: type-hint for param $4
SELECT ST_X(ST_TRANSFORM(ST_SETSRID(ST_MAKEPOINT($1,$2),$3),$4::int));
I am trying to increase my mongo log level without success:
MongoDB shell version: 2.6.10
connecting to: test
> use TreeDB
switched to db TreeDB
> db.setLogLevel(5,"query")
2018-01-23T12:11:28.221+0100 TypeError: Property 'setLogLevel' of object TreeDB is not a function
How to correctly use this function?
> db.setLogLevel
TreeDB.setLogLevel
db.help() does not output this function.
docs.mongodb references it here since 3.0: https://docs.mongodb.com/manual/reference/method/db.setLogLevel/
I am using ubuntu 16.04, mongoshell 2.6.10, mongo: 3.6.2 (via docker)
As explained in the comments, I have to install at least 3.0 version of mongoshell.
This should be done following https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
I just upgraded to 2.2.5 version. My old data with 2.0.2 had database name with special character : in the name.
After upgrade, when I am fetching data from that db, I am getting following error
assertion 16256 Invalid ns [bcxb:queryTest.system.namespaces] ns:bcxb:queryTest.system.namespaces
This is happening for all m database name having special character :
Please help.