Trying to get our CI and Review apps working correctly and have hit this road block:
ERROR: permission denied to create extension “postgis”
HINT: Must be superuser to create this extension.
I have checked that our user is schema admin, but still doesn’t work.
I did read this: Enabling pgvector extension on Managed Postgres cluster
And I understand the UI button toggle.
However, we let any dev spin up review apps for testing and sharing per PR at their discretion. The only way to turn this on for a review app (ephemeral db) is to let them into fly, so they can click a toggle box. That seems crazy to me. Am I missing something here on how this can be possible?
Are you creating these review app clusters via CI? If so you can update your CI’s creation flow to enable Postgis at cluster creation time by using fly mpg create --enable-postgis-support.
This will create the cluster with PostGis enabled out of the box, and doesn’t require using the UI to enable it. Does that work for your use case?
Granting full superuser permissions to all users isn’t something we’re planning at this time, though with MPG v2 we might be able to offer better access to features that otherwise require SU perms.
The cluster is already created, and the enable postgis support is already on. The review apps are created by CI and create MPG databases that are specific for the review app. So even thought the support is on, it is not enabled until I go to the MPG db and toggle the switch.