Antoine Eiche 8a0a5ec3a3 Create extension pg_trgm in the NixOS module
The creation of the `pg_trgm` extension needs superuser power. So,
this patch makes the extension creation in the Hydra NixOS module when
a local database is used.

If it is not possible to create this extension (remote database for
instance with nosuperuser), the creation of the `pg_trgm` index is
skipped (this index speedup queries on builds.drvpath) and warnings
are emitted:

    initialising the Hydra database schema...
    WARNING:  Can not create extension pg_trgm: permission denied to create extension "pg_trgm"
    WARNING:  HINT: Temporary provide superuser role to your Hydra Postgresql user and run the script src/sql/upgrade-57.sql
    WARNING:  The pg_trgm index on builds.drvpath has been skipped (slower complex queries on builds.drvpath)

This allows to keep smooth migrations: the migration process doesn't
require a manual step (but this manual step is recommended on big
remote databases).
2019-07-25 16:19:33 +02:00
..
2009-03-05 13:41:57 +00:00
2013-01-22 14:41:02 +01:00
2012-03-12 20:47:29 +01:00
2012-03-12 20:47:29 +01:00
2012-04-15 12:42:46 +00:00
2013-01-22 14:41:02 +01:00
2013-01-23 12:49:44 +01:00
2013-02-14 11:53:09 +01:00
2013-05-03 16:39:17 +02:00
2013-05-23 12:12:19 -04:00
2013-08-12 20:19:10 +02:00
2013-09-19 12:00:29 +00:00
2013-10-14 20:07:26 +02:00
2014-04-23 23:22:44 +02:00
2014-09-30 15:44:08 +02:00
2015-06-17 21:39:28 +02:00
2015-10-16 16:59:07 +02:00
2016-05-09 08:54:27 -04:00
2016-05-27 14:35:32 +02:00
2017-03-15 16:59:57 +01:00
2017-12-07 15:35:31 +01:00