Solution

XRAY: Extension "btree_gist.control" Missing Error in Xray Upgrade

AuthorFullName__c
Bassel Mbariky
articleNumber
000006132
ft:sourceType
Salesforce
FirstPublishedDate
2024-07-01T08:38:30Z
lastModifiedDate
2024-07-01
VersionNumber
1
1. Stop Xray completely
2. Install the btree_gist Extension: Ensure that the required PostgreSQL extension, "btree_gist", is installed on the database server. Follow these steps:
Manual Installation: 
a. Determine the version of bundled PostgreSQL currently installed.
b. Visit the official PostgreSQL repository for RHEL/CentOS at the following URL: https://download.postgresql.org/pub/repos/yum/
c. Download the appropriate PostgreSQL . contrib package version and install them.

3. Once the extension is installed, verify its availability by executing the following SQL
select * from pg_available_extensions;
select * from pg_extension;

4. Create the Extension: Using a superuser (such as the postgres superuser), create the "btree_gist" extension with the following SQL command:
CREATE EXTENSION IF NOT EXISTS btree_gist;

5. Clear Failed Migration: To resolve any pending issues related to failed migrations in Xray's database (assuming the database name is "xraydb"), connect to the database and execute:
\c xraydb
delete from db_migrations_running;

6. After completing the above steps, start Xray and verify if the issue is resolved.

If you continue to encounter difficulties or require further assistance, please contact our support team.