Cannot grant "supabase_admin" to postgres role as Owner in Supabase Dashboard
I am trying to sync my production project with my development project.
I generated the schema from prod then unlinked using the CLI.
Then, using the CLI, I linked to the development project and attempted to run
supabase db push
supabase db push
.
This gave the following output:
supabase db pushConnecting to remote database...Do you want to push these migrations to the remote database? • 123faketimestamp4567_remote_schema.sql [Y/n] yApplying migration 123faketimestamp4567.sql...ERROR: must be member of role "supabase_admin" (SQLSTATE 42501) At statement 236: ALTER PUBLICATION "realtime_messages_publication_v2_34_0" OWNER TO "supabase_admin"
supabase db pushConnecting to remote database...Do you want to push these migrations to the remote database? • 123faketimestamp4567_remote_schema.sql [Y/n] yApplying migration 123faketimestamp4567.sql...ERROR: must be member of role "supabase_admin" (SQLSTATE 42501) At statement 236: ALTER PUBLICATION "realtime_messages_publication_v2_34_0" OWNER TO "supabase_admin"
After receiving this error, I attempted the following command in the Supabase Dashboard:
GRANT supabase_admin to postgres;
GRANT supabase_admin to postgres;
After which, I received the next error:
ERROR: 42501: "supabase_admin" role memberships are reserved, only superusers can grant them
ERROR: 42501: "supabase_admin" role memberships are reserved, only superusers can grant them
My Supabase account within both projects is "Owner."
What should I do to properly execute my plan to sync the databases?
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.