From 566e908c800ba66fe4946523fee76f7047b4c189 Mon Sep 17 00:00:00 2001 From: Eric Biagiotti Date: Tue, 25 Jun 2019 11:42:44 -0400 Subject: [PATCH] 15396: Improves trgm update and installation docs Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti --- .../_install_postgres_database.liquid | 2 +- doc/admin/upgrading.html.textile.liquid | 27 ++++++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/doc/_includes/_install_postgres_database.liquid b/doc/_includes/_install_postgres_database.liquid index 5373680caf..f4b95ac0be 100644 --- a/doc/_includes/_install_postgres_database.liquid +++ b/doc/_includes/_install_postgres_database.liquid @@ -23,7 +23,7 @@ yourgeneratedpassword {% if use_contrib %}
  • Enable the pg_trgm extension -
    $ psql {{service_database}} -c "CREATE EXTENSION pg_trgm"
    +
    $ psql {{service_database}} -c "CREATE EXTENSION IF NOT EXISTS pg_trgm"
  • {% endif %}
  • Exit the postgres user shell: diff --git a/doc/admin/upgrading.html.textile.liquid b/doc/admin/upgrading.html.textile.liquid index e0661c002b..18e1abae3a 100644 --- a/doc/admin/upgrading.html.textile.liquid +++ b/doc/admin/upgrading.html.textile.liquid @@ -49,7 +49,32 @@ You can test if any records in your database are affected by going to the API se h4. Enabling Postgres trigram indexes - Feature "#15106":https://dev.arvados.org/issues/15106 improves the speed and functionality of full text search by introducing trigram indexes on text searchable database columns via a migration. Prior to updating, you must first install the postgresql-contrib package on your system and subsequently run the @CREATE EXTENSION pg_trgm@ SQL command on the arvados_production database as a postgres superuser. +Feature "#15106":https://dev.arvados.org/issues/15106 improves the speed and functionality of full text search by introducing trigram indexes on text searchable database columns via a migration. Prior to updating, you must first install the postgresql-contrib package on your system and subsequently run the CREATE EXTENSION pg_trgm SQL command on the arvados_production database as a postgres superuser. + +The "postgres-contrib package":https://www.postgresql.org/docs/10/contrib.html has been supported since PostgreSQL version 9.4. The version of the contrib package should match the version of your PostgreSQL installation. Using 9.5 as an example, the package can be installed and the extension enabled using the following: + +Centos 7 + +
    ~$ sudo yum install -y postgresql95-contrib
    +~$ su - postgres -c "psql -d 'arvados_production' -c 'CREATE EXTENSION IF NOT EXISTS pg_trgm'"
    +
    +
    + +RHEL 7 + +
    ~$ sudo yum install -y rh-postgresql95-postgresql-contrib
    +~$ su - postgres -c "psql -d 'arvados_production' -c 'CREATE EXTENSION IF NOT EXISTS pg_trgm'"
    +
    +
    + +Debian or Ubuntu + +
    ~$ sudo apt-get install -y postgresql-contrib-9.5
    +~$ sudo -u postgres psql -d 'arvados_production' -c 'CREATE EXTENSION IF NOT EXISTS pg_trgm'
    +
    +
    + +Subsequently, the psql -d 'arvados_production' -c '\dx' command will display the installed extensions for the arvados_production database. This list should now contain @pg_trgm@. h3(#v1_4_0). v1.4.0 (2019-06-05) -- 2.30.2