Question

Managed Postgres Clusters: pg_restore errors for superuser privileges

I’m trying to import a database with pg_restore to a managed postgres cluster but I get the following error:

could not execute query: ERROR: must be superuser to create an operator class

I’m connecting as “doadmin” which doesn’t have superuser privileges, how can I connect as “postgres” user? or is there a way to pg_restore allowing the creation of operator class as admin user?

Show comments

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

efox
DigitalOcean Employee
DigitalOcean Employee badge
June 12, 2019
Accepted Answer

Hey there,

At this time it isn’t possible to create a superuser with DO Managed Databases; this bars operator class access as a superuser is always needed to create one.

We’re learning more about Managed Databases every day and are always looking to improve the end-user experience. Should you want these to be implemented we’d love to hear your feedback on our IDEAS page. This is where our Product team looks to the community for ideas and use-cases that could be prioritized in future work cycles for us.

Regards, Ethan Fox Developer Support Engineer II - DigitalOcean

This is pretty mad… Similar to others I need superuser access - can’t really see any logic for that not being possible. We’re just going to move the current project out of DO as a result.

Response to edit the data and remove superuser needs is a bit dismissive. It’s less work for me to switch DB provider for this project than it is to edit the masses of data I need to import.

I also need superuser access…

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel