question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to install, permission denied to create extension "hstore"

See original GitHub issue

trying to install saleor, but getting the following error :

django.db.utils.ProgrammingError: permission denied to create extension "hstore" HINT: Must be superuser to create this extension.

I don’t and will not have the superuser right for postgreSQL for security reasons. (shared hosting solution)

Can we manually do what this extension does, with simple SQL command. Or can the database be manually prepared so we don;t have to use this extension.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
zodiacfireworkscommented, May 2, 2020

To create an extension by running migrate, make your database user superuser

ALTER USER myuser WITH SUPERUSER;

After run migrate, remove the superuser role from your user.

ALTER USER username WITH NOSUPERUSER;

You only need the superuser role to create the extensions.

You can also create the extension manually and then run migrations, if the extensions already exist the database user will not try to create it.

CREATE EXTENSION IF NOT EXISTS hstore;
1reaction
iDevPycommented, Jun 17, 2020

Login to PostgreSQL and run: CREATE EXTENSION IF NOT EXISTS hstore;

For other extensions you can do: CREATE EXTENSION IF NOT EXISTS pg_trgm; CREATE EXTENSION IF NOT EXISTS unaccent;

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to install, permission denied to create extension "hstore"
trying to install saleor, but getting the following error : django.db.utils.ProgrammingError: permission denied to create extension "hstore" ...
Read more >
Why can only a superuser CREATE EXTENSION hstore, but ...
The hstore extension creates functions that call code from an external dynamic object, which requires superuser privilege.
Read more >
Insufficient privilege to create extension - Render community
Hello. My application requires the use of the extension hstore. However while migrating my database, my migrations were stopped due to
Read more >
Adding PostgreSQL extensions without being super user?
The answer is: yes and no. It depends on the objects that get created by the extensions and it depends on the permissions...
Read more >
PG::InsufficientPrivilege: ERROR: permission denied to create ...
PG::InsufficientPrivilege: ERROR: permission denied to create extension "hstore". Created by: zenati. I have a Rails application and a migration that runs :.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found