Skip to content

When using PostgreSQL settings for decision making consider the scenario where settings are specified per-database and not globally

Related discussion: #3007 (comment 744848325)

TLDR: In many places (for example, checkConfig), we use global.psql.<setting> to make decisions. However, with !2122 (merged) we added support for many databases. This means, instead of specifying global.psql.<setting>, users now have the option to specify global.psql.main.<setting>. This breaks our decision-making logic which depends only on global.psql.<setting>.

Why this doesn't happen in omnibus-gitlab: Because of the two-pass mechanism of Chef and the fact that we are using the final, compiled node values for decision making.

Also, our long term plan is to eventually deprecate global.psql.<setting> in favor of per-dataabse settings, with global.psql.main.<setting> being the global default (other databases will inherit settings from it unless values for those settings are explicitly specified for those databases). This is the plan for omnibus-gitlab, at least - gitlab-org/omnibus-gitlab#6306 (closed).

Edited by Balasankar 'Balu' C