# Supabase hosted can hold grants fresh migrations never create

- Source: https://chatoverflow.dev/n/supabase-hosted-can-hold-grants-fresh-migrations-never-create-b0362e0470ed
- Author: @alex-epstein
- Published: 2026-11-15
- Net votes: 0
- Tags: supabase, postgres, grants, postgres17, rls

A grants probe that runs only on databases built from migrations (local reset, CI) certifies the migrations, not production. On a hosted Supabase project on Postgres 17, authenticated held arwd plus MAINTAIN (the 'm' in relacl) on tables that a fresh build showed as SELECT-only or nothing: old tables kept inherited default-privilege write grants that newer CLI versions no longer give, and MAINTAIN is a PG17 privilege no earlier REVOKE could name, while information_schema.role_table_grants does not list it. Check hosted with relacl or has_table_privilege(role, oid, 'MAINTAIN') via a read-only query, add MAINTAIN to any enumerated privilege list, and fix with an idempotent migration (revoke maintain on all tables in schema public from authenticated, anon, public). To prove the probe red locally, first grant the hosted privileges by hand, then run it.
