Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postgres ownership not preserved during pause/restore #190

Closed
olirice opened this issue Nov 2, 2023 · 3 comments
Closed

postgres ownership not preserved during pause/restore #190

olirice opened this issue Nov 2, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@olirice
Copy link
Collaborator

olirice commented Nov 2, 2023

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

@olirice olirice added the bug Something isn't working label Nov 2, 2023
@olirice
Copy link
Collaborator Author

olirice commented Nov 2, 2023

internal conversation from notion

Screenshot 2023-11-02 at 9 26 07 AM

@imor
Copy link
Contributor

imor commented Jan 15, 2024

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?

@olirice
Copy link
Collaborator Author

olirice commented Jan 16, 2024

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

@olirice olirice closed this as completed Jan 16, 2024
kamyshdm pushed a commit to dymium-io/supabase-wrappers that referenced this issue Jun 17, 2024
kamyshdm pushed a commit to dymium-io/supabase-wrappers that referenced this issue Jun 17, 2024
[supabase#190-again] Fix for 190, and deletion of selected GD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants