{% comment %} Copyright (C) The Arvados Authors. All rights reserved. SPDX-License-Identifier: CC-BY-SA-3.0 {% endcomment %}
# su postgres
postgres$ tr -dc 0-9a-zA-Z </dev/urandom | head -c25; echo
yourgeneratedpassword
postgres$ createuser --encrypted --no-createrole --no-superuser --pwprompt {{service_role}}
Enter password for new role: yourgeneratedpassword
Enter it again: yourgeneratedpassword
postgres$ createdb {{service_database}} -T template0 -E UTF8 -O {{service_role}}
postgres$ psql {{service_database}} -c "CREATE EXTENSION IF NOT EXISTS pg_trgm"
postgres$ exit