diff --git a/core/modules/pgsql/src/Driver/Database/pgsql/Install/Tasks.php b/core/modules/pgsql/src/Driver/Database/pgsql/Install/Tasks.php index 4f47489287..c1303544f1 100644 --- a/core/modules/pgsql/src/Driver/Database/pgsql/Install/Tasks.php +++ b/core/modules/pgsql/src/Driver/Database/pgsql/Install/Tasks.php @@ -298,6 +298,11 @@ public function initializeDatabase() { } $connection->query('SELECT pg_advisory_unlock(1)'); + // If we are running PostgreSQL >= 13, enable the pg_trgm extension. + if (version_compare($connection->version(), 13, '>=')) { + $connection->query('CREATE EXTENSION IF NOT EXISTS pg_trgm'); + } + $this->pass(t('PostgreSQL has initialized itself.')); } catch (\Exception $e) {