Transitioning from PostgreSQL 14.x to 18.1: What Should I Expect?

0
8
Asked By CuriousCoder42 On

I'm currently running a Python application on an EC2 instance that connects to a PostgreSQL database via RDS, which is on version 14.x. I've managed the entire deployment process through AWS CDK using TypeScript, and now I'm looking to upgrade RDS to version 18.1. I'm trying to figure out the implications of just changing the RDS version in my CDK code and running 'aws-cdk deploy --all'. Specifically, I want to know what happens during this process:

- Will it replace the 14.x instance with a new 18.x one?
- Is there an automatic pg_upgrade, or will I lose all my data?
- Do I need to run pg_upgrade manually on the EC2 instance?
- Will the new RDS instance keep the same connection string as the old one?
- What's the best practice for handling this upgrade? Any insights would be greatly appreciated!

2 Answers

Answered By TechSavvy123 On

First off, I'd strongly recommend testing this upgrade in a non-production environment to avoid any surprises. It's always better to be safe!

Answered By DatabaseGuru88 On

Honestly, I wouldn’t highly rely on CDK for such a significant version change. I tried it before, and it attempted to destroy my instance. Luckily, I had delete protection enabled. Now, I prefer to handle database changes manually and then update my CDK stack accordingly. It's the only way to be sure it'll go smoothly!

CloudNinja -

Just a heads up, the CDK generates a CloudFormation template which then executes the actions. But yeah, the way it does it can be quite unexpected sometimes!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.