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).
Hydra
Hydra is a continuous integration system based on the Nix package manager. For more information, see the manual.
For development see hacking instructions.
Icons provided free by EmojiOne.
Description
Languages
Perl
70.5%
C++
15.5%
Nix
6%
PLpgSQL
3%
Shell
2.3%
Other
2.6%