Skip to content

Prevent running CREATE EXTENSION in a slave server

Gabriel Mazetto requested to merge feature/pg-slave-detection into master

When you have replication enabled, you can have for a specific space of time your slave node without all database changes from master. The same can happen when you have an issue with replication.

This is not usually a problem to omnibus but as recently we try to enable extensions, we should take extra care that we are not trying to do that on the slave server, as it is running in read-only mode and therefore will fail. It will get this changes from the replication itself, so no harm here.

Fixes gitlab-org/gitlab-ee#628

Merge request reports

Loading