Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292190

Automatically install pg_trgm extension on PostgreSQL 13+

$
0
0

Problem/Motivation

Drupal 10+ added a requirement on the pg_trgm extension when installed in PostgreSQL environments. See #3190516: [Policy] For PostgreSQL require that the pg_trgm extension is not only installed, but also created..

This means that site admins need to take an additional manual step between setting up their database and installing Drupal, by running this query on their database:

CREATE EXTENSION pg_trgm;

In PostgreSQL 12, this must be done by a database user with superadmin privileges.

In PostgreSQL 13+, however, the pg_trgm extension has been designated as a "trusted extension" (a new concept added in 13: https://www.postgresql.org/docs/13/release-13.html#id-1.11.6.15.5.14), which means that it should be possible for Drupal to run the necessary query itself (using the less-privileged Drupal database user) during installation on a PostgreSQL 13+ database.

Proposed resolution

I propose we add some logic to Drupal's PostgreSQL database installation tasks that install the pg_trgm extension automatically if the PostgreSQL version is 13+.

Remaining tasks

TBD.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

TBD.


Viewing all articles
Browse latest Browse all 292190

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>