Editing
GitLab V18 Upgrade
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Method 1: Manual Grant (via `kubectl exec` and `psql`)== This method is good for immediate troubleshooting. 1. **Find your PostgreSQL pod:** If GitLab is managing its own PostgreSQL (the default for the Helm chart), find the PostgreSQL primary pod: kubectl get pods -l app=postgresql,release=<your-gitlab-release-name>,statefulset=postgresql-ha-postgresql -n <your-gitlab-namespace> If you're using an external PostgreSQL, you'll need to connect to it directly using a PostgreSQL client. 2. **Exec into the PostgreSQL pod (or connect externally):** kubectl exec -it <postgresql-primary-pod-name> -n <your-gitlab-namespace> -- bash (Once inside, you might need to become the `postgres` user: `su - postgres`) 3. **Connect to the GitLab database with `psql`:** psql -d gitlabhq_production -U postgres # Or your PostgreSQL superuser (Replace `gitlabhq_production` if your database name is different, and `postgres` with your superuser if it's not the default.) 4. **Grant the permission:** Identify the GitLab database user (it's often `gitlab` or `gitlab-rails` if you're using the default Helm chart). You can check it in your `values.yaml` or in the `webservice` pod's environment variables. GRANT EXECUTE ON FUNCTION pg_catalog.pg_ls_waldir() TO <gitlab_database_user>; For example, if your GitLab user is `gitlab`: GRANT EXECUTE ON FUNCTION pg_catalog.pg_ls_waldir() TO gitlab; You might also consider granting the `pg_monitor` role to the GitLab user if that's appropriate for your security model and the version of PostgreSQL: GRANT pg_monitor TO <gitlab_database_user>; '''Note:''' The `pg_monitor` role provides access to several monitoring-related functions, including `pg_ls_waldir()`, so this can be a more comprehensive solution. 5. **Exit `psql` and the pod:** \q exit 6. **Retry the GitLab upgrade:** helm upgrade <your-gitlab-release-name> gitlab/gitlab -f your_values.yaml --version <new-gitlab-version>
Summary:
Please note that all contributions to WilliamsNet Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
WilliamsNet Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Navigation
Commons
Architecture
How-To
Systems
Hardware
SysAdmin
Kubernetes
OpenSearch
Special
Pages to create
All pages
Recent changes
Random page
Help about MediaWiki
Formatting Help
Tools
What links here
Related changes
Special pages
Page information