Ability to check if underlying database is read only
What does this MR do?
Adds new method Gitlab::Database.db_read_only?
/ Gitlab::Database.db_read_write?
to determine if PostgreSQL is actually writeable or not.
Why was this MR needed?
For use in EE where want to determine if PostgreSQL is running in read only state
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
[Documentation created/updated](https://docs.gitlab.com/ee/development/writing_documentation.html#contributing-to-docs) -
API support added -
Tests added for this feature/bug - Conform by the code review guidelines
-
Has been reviewed by a UX Designer -
Has been reviewed by a Frontend maintainer -
Has been reviewed by a Backend maintainer -
Has been reviewed by a Database specialist
-
-
Conform by the merge request performance guides -
Conform by the style guides -
If you have multiple commits, please combine them into a few logically organized commits by squashing them -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ee/issues/6265
Related MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6248
Edited by Brett Walker