New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker upgrade database #4650
Docker upgrade database #4650
Conversation
Label error. Requires at least 1 of: Feature, Bug, Enhancement, Maintenance, Documentation, Performance, Do not publish. Found: |
5144dd2
to
a06e23f
Compare
Label error. Requires at least 1 of: Feature, Bug, Enhancement, Maintenance, Documentation, Performance, Do not publish. Found: |
1 similar comment
Label error. Requires at least 1 of: Feature, Bug, Enhancement, Maintenance, Documentation, Performance, Do not publish. Found: |
docker/postgres_upgrade.sh
Outdated
POSTGRES_FULL_VERSION=$(docker-compose exec -T db-postgres psql --user=seed -d postgres -c 'SELECT version();' | sed -n 3p) | ||
# Extract the version number using regex | ||
POSTGRES_VERSION=$(echo "$POSTGRES_FULL_VERSION" | sed -n 's/.*PostgreSQL \([0-9]*\.[0-9]*\).*/\1/p') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should just be able to use:
POSTGRES_VERSION=$(docker-compose exec -T db-postgres psql --user=seed -d postgres -t -A -c 'SHOW server_version;')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Will change.
Might also be worth using the |
Will do. |
Label error. Requires at least 1 of: Feature, Bug, Enhancement, Maintenance, Documentation, Performance, Do not publish. Found: |
2 similar comments
Label error. Requires at least 1 of: Feature, Bug, Enhancement, Maintenance, Documentation, Performance, Do not publish. Found: |
Label error. Requires at least 1 of: Feature, Bug, Enhancement, Maintenance, Documentation, Performance, Do not publish. Found: |
e71cd04
to
39b265d
Compare
ce904da
to
53bfdf1
Compare
53bfdf1
to
8633fc4
Compare
0864ce4
to
9913a10
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thanks @dhaley!
Any background context you want to provide?
The script
./docker/postgres_upgrade.sh
will properly upgrade a database from pg12.7-(2.3.0) to pg14.11-(2.14.2). It works in conjunction with the "docker-compose.pgupgrade.yml" docker-compose file to temporarily run Timescale Postgres 13 and 14 images.What's this PR do?
How should this be manually tested?
./docker/postgres_upgrade.sh --source-pg-conv-version 13 --source-ts-conv-version 2.11.2 --target-pg-test-version 14 --target-ts-test-version 2.11.0
What are the relevant tickets?
Screenshots (if appropriate)