sudo gitlab-psql -d gitlabhq_production

Category: GitLab

sudo gitlab-psql -d gitlabhq_production

Open a psql session on the GitLab database

Connects to the gitlabhq_production database, where GitLab stores its application data, using the bundled PostgreSQL client. Standard psql features work, including SQL queries and meta-commands. Read-only queries are safe, but direct writes bypass GitLab's own checks.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.