`postgres` ownership not preserved during pause/restore
olirice opened this issue · comments
Bug report
If you create a Wrapper in Supabase Studio it is owned by the postgres
role.
If you then pause and restore the project, the owner of the foreign data wrapper + server change to supabase_admin
Note that the ownership changes for:
- The foreign data wrapper
create foreign data wrapper ...
- The foreign server
create server
but not the foreign tables (these continue to be owned by postgres)
I tested with airtable and firebase
There is an associated support ticket (resolved): https://app.hubspot.com/live-messages/19953346/inbox/5492182653#email
please update in the notion task as well as here
I couldn't reproduce with the latest platform locally. I tried creating a stripe wrapper both from the UI and by manually running the SQL commands from the studio. Also tried creating the extension in different schemas as there's another issue in which permissions depend upon the schema. In all cases, the dump file correctly contains lines updating ownership to postgres
:
CREATE FOREIGN DATA WRAPPER stripe_wrapper HANDLER extensions.stripe_fdw_handler VALIDATOR extensions.stripe_fdw_validator;
ALTER FOREIGN DATA WRAPPER stripe_wrapper OWNER TO postgres;
CREATE SERVER stripe_server FOREIGN DATA WRAPPER stripe OPTIONS (
api_key_id 'f869e5ea-a566-4218-aeb1-edeb91ceb055',
api_url 'https://api.stripe.com/v1'
);
ALTER SERVER stripe_server OWNER TO postgres;
@olirice how exactly did you create the foreign wrapper/server? Can you reproduce it still?
Just ran it through the described process in that thread and am no longer able to reproduce
Hopefully I was mistaken during prior testing. If not, we can handle this if/when it pops up again