Postgres version 16.4 not shipped with community edition 17.4

Hello, here it says that with Gitlab 17.4 postgres 16.4 should be included: PostgreSQL versions shipped with the Linux package | GitLab

However in my gitlab community container i only have postgres 14.11, why is 16.4 not included?

I have already installed 16.4 in the container and used it but this is resetted every few days even in the same container, i only stop and restart them and after a few days there is 14.11 in use again.

After installing postgres-client-16 in the container these were my steps:

  1. rm /opt/gitlab/embedded/bin/pg_dump
  2. rm /opt/gitlab/embedded/bin/psql
  3. ln -s /usr/bin/pg_dump /usr/bin/psql /opt/gitlab/embedded/bin

after a few days it was reverted somehow

It would suggest that the Gitlab documentation is incorrect. On my native Linux installation (non-docker) it doesn’t have PostgreSQL 16 either. I expect PostgreSQL 16.x support will come in a later version of Gitlab.

Doing what you do with installing the packages manually and symlinking will reset in certain scenarios. It would be best to wait until PostgreSQL can be upgraded. If you have an external PostgreSQL server that is running 16, that would be fine, but the Gitlab client tools will still be 14.x until support for 16.x finally arrives.

Ok, do you know where we can report this problem, i mean the documentation is for EE and not CE so…

I run a Postgres 16 and Gitlab works just fine with it but the gitlab backup stuff does not work, i think i will add the symlinking stuff to my backup script until this is resolved

It doesn’t exist in gitlab-ce or gitlab-ee.

You can open an issue here to report: Issues · GitLab.org / GitLab · GitLab

The Linux packages themselves provide a switch/upgrade procedure, if an additional PostgreSQL version is available. This workflow assumes a non-idempotent environment, such as a Linux VM, persisting any changes made. A container is volatile, with any changes made at runtime, being removed after container restart.

I don’t know how to persist the change, except for recommending to build your own container image, and override the used PostgreSQL version. The container image build tools use the Dockerfile in the Omnibus package repository. Might need research which environment variables to override specifically. Install GitLab in a Docker container | GitLab

A better alternative might be to install your own PostgreSQL instance/VM/container, and point GitLab to it. That way you can manage the desired major versions, and upgrade GitLab and PostgreSQL in tandem when necessary.

  1. The changes i made in the docker container are not removed after a container restart, only if the container is removed with something like docker compose down, so some random procedure inside the container changes the symlinks back to its original state, i tested this.

  2. I have “my own” postgres container but i updated it to Postgres 16 because of the gitlab documentation that lists postgres 16.4 support in gitlab 17.4