I attempting to restore a database into a PostgreSQL instance on Azure.
I am issuing these statements as postgres and attempting to change owner to another role that was a superuser.
My restore errors on this line (actual names changed to protect the innocent):
ALTER TABLE schema_m.table_a OWNER TO role_a;
SQL Error : ERROR: must be member of role “role_a”
GRANT postgres TO role_a GRANTED BY postgres;
I believe the issue is related to the postgres user not being a superuser on Azure PostgreSQL, but maybe I’m wrong.
I’ve also tried granted all privs to both:
GRANT ALL PRIVILEGES ON SCHEMA schema_m TO role_a; GRANT ALL PRIVILEGES ON SCHEMA schema_m TO postgres;
But I still receive the error. Am I missing something obvious?
PostgreSQL 9.5.14, compiled by Visual C++ build 1800, 64-bit