-
Notifications
You must be signed in to change notification settings - Fork 5
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
Overhaul postgres upgrade process v14 --> v16 #86
Conversation
Thanks for debugging! I will add: # Check if required docker volume exists
docker volume inspect drone-tm-pg-16-data
exit_code=$?
# Exit script volume does not exist
if [ "$exit_code" -eq 1 ]; then
echo
echo "Please create docker volume 'drone-tm-pg-16-data' first."
echo
echo -e "\e[0;33mdocker volume create drone-tm-pg-16-data\e[0m"
echo
exit 0
fi I was also receiving similar If not, I can fix this in the final container when I do the dbvacuum. |
@nrjadkry the |
@spwoodcock the test for required volume is working in the script. But I am still facing |
Found the issue and documented here! The issue was using a Debian based I overhauled the upgrade process to really slim it down. Is there any data in the prod db we need to recover? |
54ce412
to
ed17875
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.
Issues Faced in my local machine
Flag --abort-on-container-failure
was not found on my docker version of Docker version 24.0.6, build ed223bc
Also the script breaks with role root doesn't exists for localhost. But, when I compose down both running upgrade and pg:14 db and then run compose up with, I can see the database is upgraded to version 16 with old data too. Also coalition
issue is resolved too.
The first issue is actually to do with The second about role 'root' can be fixed by running the command from the repo main directory: docker compose --file contrib/pg-upgrade/docker-compose.yml \
--abort-on-container-failure If you run from the contrib/pg-upgrade dir, then the |
I just added an update to properly use the vars:
I added defaults to the bash variables, so this should actually work when running in the |
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.
The solution is working great! It now upgrades database perfectly. I think it's good to go live now! 👍 🎉
@spwoodcock @nischalstha9 Deployments are still failing here: |
Looks like exit code 1 on |
If you can think of a nice way to do that please go ahead @nischalstha9 🙏 I will come back to work on this later today / tomorrow 👍 |
To fix the issue in the CI we can simply use |
Just made an update that should fix this:
If not, let me know I will look into it tomorrow 👍 |
Follow on from #85
Issue
Update 24/07/2024