- Remove all secondary Geo nodes
- Remove the primary node from the UI
- Remove secondary replication slots
- Remove Geo-related configuration
- (Optional) Revert PostgreSQL settings to use a password and listen on an IP
If you want to revert to a regular Omnibus setup after a test, or you have encountered a Disaster Recovery situation and you want to disable Geo momentarily, you can use these instructions to disable your Geo setup.
There should be no functional difference between disabling Geo and having an active Geo setup with no secondary Geo nodes if you remove them correctly.
To disable Geo, follow these steps:
- Remove all secondary Geo nodes.
- Remove the primary node from the UI.
- Remove secondary replication slots.
- Remove Geo-related configuration.
- (Optional) Revert PostgreSQL settings to use a password and listen on an IP.
To disable Geo, you need to first remove all your secondary Geo nodes, which means replication will not happen anymore on these nodes. You can follow our docs to remove your secondary Geo nodes.
If the current node that you want to keep using is a secondary node, you need to first promote it to primary. You can use our steps on how to promote a secondary node in order to do that.
- Go to Admin Area > Geo (
- Click the Remove button for the primary node.
- Confirm by clicking Remove when the prompt appears.
To remove secondary replication slots, run one of the following queries on your primary
Geo node in a PostgreSQL console (
If you already have a PostgreSQL cluster, drop individual replication slots by name to prevent removing your secondary databases from the same cluster. You can use the following to get all names and then drop each individual slot:
SELECT slot_name, slot_type, active FROM pg_replication_slots; -- view present replication slots SELECT pg_drop_replication_slot('slot_name'); -- where slot_name is the one expected from above
To remove all secondary replication slots:
SELECT pg_drop_replication_slot(slot_name) FROM pg_replication_slots;
SSH into your primary Geo node and log in as root:
/etc/gitlab/gitlab.rband remove the Geo related configuration by removing any lines that enabled
## In pre-11.5 documentation, the role was enabled as follows. Remove this line. geo_primary_role['enable'] = true ## In 11.5+ documentation, the role was enabled as follows. Remove this line. roles ['geo_primary_role']
After making these changes, reconfigure GitLab for the changes to take effect.
If you want to remove the PostgreSQL-specific settings and revert
to the defaults (using a socket instead), you can safely remove the following
lines from the
postgresql['sql_user_password'] = '...' gitlab_rails['db_password'] = '...' postgresql['listen_address'] = '...' postgresql['md5_auth_cidr_addresses'] = ['...', '...']