RDS upgrade postgres version 13.1, unsupported DB Instance Class - postgresql

I'm trying to upgrade from version 12.5 to the version 13.1 in RDS. But I'm receiving an error similar to the one described in this question: RDS does not support creating a DB instance with the following combination. As far as I understand in order to upgrade a proper version DB instance class should be selected. However the error message shows a previous selection, not a new one. Same message is received in Terraform setting up
engine_version = "13.1"
instance_class = "db.t3.small"
Screenshot from AWS showing the changes and message:
Copied error message to make it easier to research:
We're sorry, your request to modify DB instance [service-name] has failed.
RDS does not support creating a DB instance with the following combination: DBInstanceClass=db.t2.small, Engine=postgres, EngineVersion=13.1, LicenseModel=postgresql-license. For supported combinations of instance class and database engine version, see the documentation.
Is there some key to allow_instance_class_change (a made up key) or something else I overlooked what prevents an upgrade? Thank you!

I would suggest upgrading to T3 first, then upgrading to PostgreSQL 13. If you need to do those at the same time you might have better luck going through the API, but I'm guessing the way the version 13 upgrade works you need to already be on a supported instance type for the upgrade to proceed.

Related

You have specified a database that is not empty, please specify an empty database

I'm trying to connect to an RDS cluster in AWS that's an Aurora PostgreSQL database. It's a brand-new database that I created along with the instances that I have Jira deployed to. However, when I try to connect to the instance from the Jira configuration screen I get this error
You have specified a database that is not empty, please specify an empty database.
I haven't touched this database at all, why is it giving me this error? I have one read and one write database in my cluster and the "hostname" is the endpoint for my write database, which is what the docs say. Could this be an issue with the Jira version I'm using?
This is the download link I'm using in my user-data script to install Jira. I'm also using PostgreSQL version 12.11
https://www.atlassian.com/software/jira/downloads/binary/atlassian-servicedesk-4.19.1-x64.bin
I switched to a different PostgreSQL version and now it's working.
PostgreSQL version 12.11 was giving me the error and switching to version 13.7 works as expected.

Getting Invalid schema name error on postgresql RDS after upgrading from 9.3 to 9.4

As pointed by amazon that PostgreSQL 9.3 is deprecated and need to upgrade our version of PostgreSQL to upper version, we just upgraded our version to 9.4. But after upgrade we are not able to do any save() operation from your Yii 1.1 project locally but the operation is working fine from the server.
When we try to run our project from locally and connect the remote PostgreSQL, we got the below error.
{"error":"SQLSTATE[3F000]: Invalid schema name: 7 ERROR: schema
\"publicubfo06sm23qicfa8kmm0nrv3td81qf928i\" does not
exist","try":"end"}
When I try to see my existing schemas using,
SELECT table_name FROM information_schema.tables
I got 3 values namely 'public','pg_catalog', 'information_schema'
Also want to mention that previously with our version 9.3 we were able to do model operations on Yii 1.1 like $model->save() and then immediately get back the primary key value using $model->id or $model->getPrimaryKey() but now it is not working. Only the $lastId = Yii::app()->db->getLastInsertID('tbl_user_group_id_seq'); way is working now.
Can anyone point me out what is the reason behind it? is something get lost while upgrading from 9.3 to 9.4 like schema, role, sequence or anything else that is causing the errors now to access my RDS from local machine.

How do I upgrade an RDS instance's PostgreSQL version using TerraForm?

My current RDS instance is running PostgreSQL version 9.6.3, but I'd like to upgrade it to version 10.1. However, when I set the new version number in my TerraForm configuration and set allow_major_version_upgrade to true, I run into the following error:
Error: Error applying plan:
1 error(s) occurred:
* aws_db_instance.db_instance: 1 error(s) occurred:
* aws_db_instance.db_instance: Error modifying DB Instance db-example: InvalidParameterCombination: Cannot find upgrade path from 9.6.3 to 10.1.
status code: 400, request id: <id>
In fact, I get a similar error message when I set 9.6.4 as the new version number - which already is confusing, since auto_minor_version_upgrade is also set to true, yet the instance is still at 9.6.3.
As you can see, there's still a lot of RDS and PostgreSQL I have to come to grips with, so any background info that can help me understand the problem would be very welcome as well.
Edit:
After setting just allow_major_version_upgrade to true without actually modifying the version resulted in this error:
* aws_db_instance.db_instance: Error modifying DB Instance db-example: InvalidParameterCombination: No modifications were requested
As #ydaetskcoR pointed out, you can only upgrade to PostgreSQL versions actually supported by RDS, which is 9.6.5 at the moment.
The upgrade from 9.6.3 to 9.6.5 as a result of auto_minor_version_upgrade will also not happen as soon as it is supported, as described in an email Amazon sent a while ago:
Beginning January 22 2018, if your database instances have the “Auto Minor Version Upgrade” option enabled, we will automatically upgrade your PostgreSQL database instances, using the same scheme mentioned above, during your maintenance window. If you do not wish to apply these upgrades at this point in time, please set the “Auto Minor Version Upgrade” option to "No" before January 20, 2018.

phraseto_tsquery in PostgreSQL 9.5x or just from 9.6x?

I'm finding references in the 9.5 manual to phraseto_tsquery
https://postgrespro.com/docs/postgrespro/9.5/textsearch-controls
But if I use it in my query it gives me this error:
No function matches the given name and argument types.
SELECT phraseto_tsquery('english', 'The Fat Rats');
Was this function not added with 9.5 as intended or is it likely there's some other problem on my side. Running 9.5.4 of the database currently. Anyone that can confirm?
For anyone looking; took the step to install postgresql 9.6beta4 and I'm no longer receiving the error message. In other words phraseto_tsquery seems to only be fully supporting in the current 9.6 beta and upcoming full release.

PostgreSQL: After using CreateLang, I still get an error "42704: language "plpgsql" does not exist"

I am using pgProvider on a MVC3 Mono application and had no issues on Windows Postgres 9.2. I am migrating to my production Linux/Mono environment, and received an error when attempting to access the provider:
"42704: language "plpgsql" does not exist"
I am using postgreSQL 8.4 on CentOS 6.3
I looked at some info, and ran the following:
createlang -d dbname plpgsql
When I run it again, it affirms that the database is already there.
I restarted postgresql and my app. However, I still get the above error.
Does anyone have any info on why I would still receive an "plpgsql does not exist -- after it is installed?"
In general this sort of error is an indication that something is not as you expect and you need to challenge your assumptions.
Please note that languages do not require restarting the database server to take effect on any version of PostgreSQL. Also note that what languages are allowed in PostgreSQL is a per-db catalog entry (languages, unlike users and roles, are not cluster-global).
So in troubleshooting this, you need to start with:
Is this the right db? The right server?
Is my application connecting to the same db/server I think it is?
Given that createlang affirms that the language exists after you run it, this can't be an issue with PostgreSQL raising a phony error. Instead it must be a problem with the changes you made not affecting the database your application is using.