Support configuring application_name in database.yml
By default, the Ruby PostgreSQL driver will specify a
fallback_application_name
based on the process name and use that as
part of the appname
connection string. This appname
gets sent to
PgBouncer, which calls SET application_name
every time a connection is
used by Rails.
To reduce the load on the database, we want to have the ability to
disable the setting of application_name
. This can be done by setting
this value to a blank string. Note that setting the environment variable
PGAPPNAME
to a blank string does not do the same thing because an
empty environment variable is not defined.
We did this in Omnibus already: gitlab-org/omnibus-gitlab!4808 (merged)
Relates to gitlab-org/gitlab#292022 (closed), https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/12054