I'm trying to import dump with extensions it it, excerpt from SQL:
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
CREATE EXTENSION IF NOT EXISTS hstore WITH SCHEMA public;
COMMENT ON EXTENSION hstore IS 'data type for storing sets of (key, value) pairs';
Import (through Gcloud SQL UI) fails with SET SET SET SET SET SET CREATE EXTENSION ERROR: must be owner of extension plpgsql
.
That is an understandable error (GCloud service user does not have the permissions), but it doesn't help. I cannot control restore process if triggered by UI and set ownerships manually, Google cloud SQL does not allow giving a role superuser permissions (and doing so is not a good way to deal with this).
What is best course of action in such situation?