Skip to content

Only enable postgresql_extension if database exists

Richard Clamp requested to merge rc-3118-postgres_extension_check_database into master

What does this MR do?

Changes the postgresql_extension LWRP to check if the target database exists before attempting to load an extension into it.

This avoids a problem we see when gitlab_rails['enabled'] = false as there will be no local database created.

Checklist

See Definition of done.

  • Change added to CHANGELOG.md. Not applicable for Documentation changes and minor changes.
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA, if applicable
  • MR targeting master branch
  • MR has a green pipeline on GitLab.com

Reviewer Checklist

In addition to above, reviewer must:

  • Pipeline is green on dev.gitlab.org if the change is not touching documentation or internal cookbooks

References

Closes #3118 (closed)

Edited by GitLab Release Tools Bot

Merge request reports