Content
You are here:
ERROR: permission denied to create extension "btree_gist" (Ubuntu 18.04 > 20.04 PG 9.5 > 12)
Added by ravenous bugblatterbeast 12 months ago
After upgrading from Ubuntu 18.04 to 20.04 "sudo openproject configure" failed because the database version was insufficient. I upgraded to PG 12, following the instructions here https://gorails.com/guides/upgrading-postgresql-version-on-ubuntu-server. After that I retried to run the configuration script but got an error.
-- execute("CREATE EXTENSION IF NOT EXISTS btree_gist; ALTER TABLE journals ADD CONSTRAINT non_overlapping_journals_validity_periods EXCLUDE USING gist (journable_id WITH =, journable_type WITH =, validity_period WITH &&) DEFERRABLE")
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::InsufficientPrivilege: ERROR: permission denied to create extension "btree_gist"
HINT: Must be superuser to create this extension.
Configuration script was called as root. Database user for openproject is not privileged though.
EDIT:
This is how the access privileges of the database look like
# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-------------+-------------+----------+-------------+-------------+--------------------------
openproject | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | postgres=CTc/postgres +
| | | | | =Tc/postgres +
| | | | | openproject=CTc/postgres
/EDIT
Replies (1)
I was impatient and temporarily assigned postgresql user "openproject" the role SUPERUSER.
That fixed the issue for me. It's probably not how the upgrade should be done, though. I'd still be interested to know what's wrong with my configuration.