[go: up one dir, main page]

Provide option to disable using prepared statements for postgres

Summary

If you deploy the charts as-is, Gitlab appears to try and use prepared statements - which are all well and good, but, depending on your external postgres config (or using a pooler like pgbouncer) this will cause Gitlab to fail

Steps to reproduce

In my case, I deployed the latest charts (2.0.3), and checked the unicorn logs

Configuration used

Using the standard example config will reproduce

Current behavior

When the unicorn pods start, the log fills up with a variety of PG exceptions like:

[gitlab-unicorn-6ff7f77dd5-hv284 unicorn] ActionView::Template::Error (PG::DuplicatePstatement: ERROR:  prepared statement "a1" already exists 
[gitlab-unicorn-6ff7f77dd5-hv284 unicorn] : SELECT  "user_statuses".* FROM "user_statuses" WHERE "user_statuses"."user_id" = $1 LIMIT $2): 
[gitlab-unicorn-6ff7f77dd5-hv284 unicorn]      5:     .user-name.bold 
[gitlab-unicorn-6ff7f77dd5-hv284 unicorn]      6:       = current_user.name 
[gitlab-unicorn-6ff7f77dd5-hv284 unicorn]      7:     = current_user.to_reference 
[gitlab-unicorn-6ff7f77dd5-hv284 unicorn]      8:     - if current_user.status 
[gitlab-unicorn-6ff7f77dd5-hv284 unicorn]      9:       .user-status.d-flex.align-items-center.prepend-top-2.has-tooltip{ title: current_user.status.message_html, data: { html: 'true', placement: 'bottom' } } 
[gitlab-unicorn-6ff7f77dd5-hv284 unicorn]     10:         %span.user-status-emoji.d-flex.align-items-center 
[gitlab-unicorn-6ff7f77dd5-hv284 unicorn]     11:           = emoji_icon current_user.status.emoji 

Expected behavior

I could turn off prepared statements and have Gitlab run without exception

Versions

  • Chart: 2.0.3
  • Platform:
    • Cloud: IBM Cloud
  • Kubernetes: (kubectl version)
    • Client:
    • Server:
  • Helm: (helm version)
    • Client: v1.14.2
    • Server: v1.12.9+IKS