-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Upgrade to PostgreSQL 13 #2572
Comments
I successfully updated to PostgreSQL:13, getting ready for upgrade to The container I've build also easily allows for configuration of a cluster, just start a second one and link it. Everything is configured with environment variables. One of the best things about the container is that it performs automatic migrations. I was previously also using the So here is the guide on how switched.
Inside the host mount you should create a directory Result on host:
cd /volume1/Docker/gitlab/data/postgresql/data/12.12/main
echo "12.12" > PG_VERSION_FULL
Also do not worry about additional directories the container will auto configure everything.
The trick is to have the database start correctly with the same major version with a different container. When you have the database up & running upgrading to version
ImportantMy advice if you are thinking about updating
Final NoteThe container I've built can easily be used to spin up and turn you PostgreSQL into a cluster. Checkout the examples int he earlier mentioned repository. Overall should be simple procedure, took me about 10m to switch containers. |
@sue445 If your going to try, please let me know if all the steps were clear and you experience. |
@gjrtimmer I'm sorry My company is currently planning a GitLab migration. We are currently using Therefore, I don't plan to upgrade the container version of PostgreSQL. |
This is how I solved the problem of upgrading the PG version to 13. FROM sameersbn/gitlab:14.0.5
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
RUN apt update -y
RUN DEBIAN_FRONTEND=noninteractive apt purge postgresql-12 postgresql-client-12 postgresql-contrib-12 -y
RUN apt remove postgresql-12 postgresql-client-12 postgresql-contrib-12 -y
RUN DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends postgresql-13 postgresql-client-13 postgresql-contrib-13 -y \
&& rm -rf /var/lib/apt/lists/* |
Cloned the sameersbn/docker-postgresql repo and easily upgraded to version 14 by changing the value of the PG_VERSION environment variable |
@sramazzina can you please give some further explanations on what you exactly did to upgrade the PG12 to 14? Thanks in advance EDIT: Ah - I saw that you already made a PR to the original postgresql repo. |
How did you migrate from |
No, everything is my full scratch 😇 I have written all about the GitLab migration below. (But in Japanese) |
I tried to upgrade
|
Look at this: #2771 (comment) And alternaitve: #2771 (comment) |
Do you use the image created by this |
Figured it out. This is another annoying problem with Ubuntu Jammy containers requiring |
PostgreSQL 12 is deprecated since GitLab 15.0
https://about.gitlab.com/releases/2022/05/22/gitlab-15-0-released/#release-deprecations
docker-gitlab is using 12, so it would be better to upgrade.
https://github.com/sameersbn/docker-gitlab/blob/14.10.3/docker-compose.yml#L14
The text was updated successfully, but these errors were encountered: