ARTIFACTORY: How to resolve "CREATE EXTENSION IF NOT EXISTS pg_trgm" issue

ARTIFACTORY: How to resolve "CREATE EXTENSION IF NOT EXISTS pg_trgm" issue

AuthorFullName__c
Ashraf Kherbawy
articleNumber
000005554
ft:sourceType
Salesforce
FirstPublishedDate
2023-01-19T11:10:39Z
lastModifiedDate
2023-01-19
VersionNumber
2

When you upgrade to Artifactory version 7.49.x, some of the schemas in the DB have changed. One of those schemas is a DB conversion that uses the pg_trgm extension.

The below error indicates that you are missing the pg_trgm extension:

Failed to execute query: ERROR: permission denied to create extension "pg_trgm"
  Hint: Must be superuser to create this extension.:
CREATE EXTENSION IF NOT EXISTS pg_trgm

In order to resolve this issue, we need to perform the following:
1. Make sure that you have the postgresql-contrib module installed, in accordance with your postgresql version.
2. Using a superuser (Can be the postgres superuser), create the pg_trgm extension using the following command: 

CREATE EXTENSION IF NOT EXISTS pg_trgm;

3. Restart Artifactory.