Question

Trying to install PostGIS

Posted December 24, 2019 1.2k views
DigitalOcean Managed PostgreSQL Database

The project I created this managed database for requires the postgis extension to be installed. However, the system seems to create the extension under the postgres user (superuser).

That seems to cause the following error when trying to “CREATE EXTENSION postgis_topology;”: > ERROR: type “geometry” does not exist

I have tried all known solutions, like ensuring that the postgis schema is in the search_path, but I think the problem is caused by the ownership.

As We cannot access a superuser, how can I install postgis? It is a must to continue using the managed database. As we are not allowed to change the owner of the extension, Can I get someone from your team to do it?

Alternatively, am I missing something in the extension creation process, that would avoid this?

Thank you in advance for all the help!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @ilauzirika,

I was able to execute create postgis and postgis_topology extension commands without an error using “doadmin” user.

defaultdb=> CREATE EXTENSION postgis;
CREATE EXTENSION
defaultdb=> CREATE EXTENSION postgis_topology;
CREATE EXTENSION

Managed Database Clusters do support some modern PostgreSQL extensions. These can be enabled with the create extension command. More information about create extension and DO supported extensions can be found in the following documentation:

https://docs.digitalocean.com/products/databases/postgresql/resources/supported-extensions/

You can raise a support case with Do if you are facing any issue with the Postgres extension creation.

I hope this helps!

Regards,
Rajkishore