Skip to content

WIP: Maintenance on PostgreSQL clients#3186

Open
sachilles wants to merge 14 commits into
sameersbn:masterfrom
sachilles:upgrade-postgresql-clients
Open

WIP: Maintenance on PostgreSQL clients#3186
sachilles wants to merge 14 commits into
sameersbn:masterfrom
sachilles:upgrade-postgresql-clients

Conversation

@sachilles
Copy link
Copy Markdown
Collaborator

Since PostgreSQL v18 was already published we need to provide a suitable postgresql client as well.

However, following the requirements for GitLab CE and in particular for PostgreSQL (see https://docs.gitlab.com/18.5/install/requirements/#postgresql) we should remove all clients for PostgresSQL versions smaller than 16.

@sachilles
Copy link
Copy Markdown
Collaborator Author

@kkimurak What do you think about this PR and the removal of old PostgreSQL client versions. I guess, we have to add a comment to the release notes. Otherwise it might be possible that a lot of users could run into trouble.

@sachilles sachilles changed the title Add PostgreSQL client for v18 Maintenance on PostgreSQL clients Nov 13, 2025
@kkimurak
Copy link
Copy Markdown
Contributor

kkimurak commented Nov 14, 2025

I think it's ok to remove old PostgreSQL clients. In addition to release notes, how about displaying a warning (or terminating with an error) if the minimum and maximum version requirements are not met?
The process for obtaining the server version has already been implemented, so changing it to the following should generally work (see my rough implementation: check-potgresql-server-version-and-warn branch based on this PR, especially commit 7199c08)

By the way, according to the link, Maximum PostgreSQL version for GitLab 18.x is 17.x (tested against GitLab 17.10 and later)

@sachilles
Copy link
Copy Markdown
Collaborator Author

sachilles commented Nov 21, 2025

@kkimurak Nice idea and I'll take over your commits. However, since GitLab does not support PostgreSQL v18 so far not officially, we'll wait before publishing this branch.

@sachilles sachilles force-pushed the upgrade-postgresql-clients branch 2 times, most recently from 64d1b4e to eb93420 Compare November 27, 2025 05:46
@sachilles sachilles force-pushed the upgrade-postgresql-clients branch from eb93420 to 8fd8978 Compare December 10, 2025 21:54
@sachilles sachilles force-pushed the upgrade-postgresql-clients branch 2 times, most recently from 9e35700 to 497d0d8 Compare December 31, 2025 16:25
@sachilles sachilles force-pushed the upgrade-postgresql-clients branch 3 times, most recently from 5e2c7bc to 14e2faa Compare January 9, 2026 19:15
@sachilles sachilles force-pushed the upgrade-postgresql-clients branch from 14e2faa to c2eea91 Compare February 11, 2026 20:00
@sachilles sachilles force-pushed the upgrade-postgresql-clients branch 3 times, most recently from c2eea91 to fb6a457 Compare May 27, 2026 06:53
@sachilles
Copy link
Copy Markdown
Collaborator Author

sachilles commented May 27, 2026

@kkimurak Since GitLab version 19 (see #3250) requires at least PostgreSQL version 17, I would very much like to consider this PR.

Since I am not yet satisfied with the current state of the PR, I would modify it as follows:

  • If the existing PostgreSQL server version is lower than the version required by GitLab, the container should not start, and a message indicating the necessary PostgreSQL update should appear.
  • If the existing PostgreSQL server version is higher than the one required by GitLab, only a warning should be displayed; the container should not be prevented from starting.

What do you think?

@sachilles sachilles force-pushed the upgrade-postgresql-clients branch from 58ebee9 to 0ffee13 Compare May 27, 2026 07:36
Copy link
Copy Markdown
Contributor

@kkimurak kkimurak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sachilles Thank you for your work and sorry for delay, generally looks good to me.
I found some mistake in my code. I don't think these will be a problem, but I'll correct them just in case.

Comment thread Dockerfile Outdated
NODE_ENV=production \
NO_SOURCEMAPS=true
NO_SOURCEMAPS=true \
# v18.5.2 : minimum = 16.5, maximum = 17.x (currently 17.6, is 170006)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current postgresql 17.x release is 17.10 (170010) so my comment in code is stale a bit ((currently 17.6, is 170006)). If you find future maintenance troublesome, you might consider deleting the line.

$ docker run --rm -d --name psql17_test kkimurak/sameersbn-postgresql:17-20260521
b41212df4b1843b50091f6d452665847e3decc4f89dd2e9cff87af18077ab753

$ docker exec -it -u postgres psql17_test psql -h localhost -c 'SHOW server_version_num;'
 server_version_num 
--------------------
 170010
(1 row)
Suggested change
# v18.5.2 : minimum = 16.5, maximum = 17.x (currently 17.6, is 170006)
# v18.x : minimum = 16.5, maximum = 17.x (currently 17.10, is 170010)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took your comment and since rebased onto branch upgrade-to-19.0.0 adapted your suggestion for GitLab v19.x.

Comment thread assets/runtime/functions Outdated
@sachilles sachilles force-pushed the upgrade-postgresql-clients branch from 0182f47 to c2b0e2d Compare May 27, 2026 10:45
Apply suggestion from @kkimurak.

Co-authored-by: KIMURA Kazunori <33391846+kkimurak@users.noreply.github.com>
@sachilles sachilles requested a review from kkimurak May 27, 2026 11:18
@sachilles
Copy link
Copy Markdown
Collaborator Author

@kkimurak Thanks for your additional review!

@sachilles sachilles changed the title Maintenance on PostgreSQL clients WIP: Maintenance on PostgreSQL clients May 27, 2026
Copy link
Copy Markdown
Contributor

@kkimurak kkimurak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My home wired network connection is unavailable until the end of the month, and I only have a slow, data-limited connection, so I can't even fetch GitLab codebase and therefore can't build and test the image.
Anyway, from what I've quickly checked, it looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants