Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

supabase db push fails with "must be owner of relation messages" (SQLSTATE 42501)

Chiusa
#6,116 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@7ttp ci sta già lavorando.

Dal 8/8/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

🐛 Bug supabase/cli
Affected area

Migrations

Supabase CLI version

2.109.1

Operating system

macOS Sequoia (Apple Silicon)

Installation method

brew

Command
supabase db push
Actual output
Applying migration ...

ERROR: must be owner of relation messages
SQLSTATE: 42501

The migration aborts and no policy is created.

The exact same SQL succeeds when executed manually from the Supabase SQL Editor as the `postgres` role.
Expected behavior

The migration should execute successfully and create the RLS policy on realtime.messages, since the same SQL executes successfully from the Supabase SQL Editor as the postgres role and this workflow is documented for Realtime Authorization.

Steps to reproduce
  1. Create a Supabase Cloud project.
  2. Configure Realtime Authorization following the official documentation.
  3. Add a migration containing:

CREATE POLICY authorize_record_edit_presence
ON realtime.messages
FOR ALL
TO authenticated
USING (
realtime.topic() LIKE 'record_edit:%'
AND split_part(realtime.topic(), ':', 2)::uuid = fn_get_current_user_unit_id()
);

  1. Run:

supabase db push

  1. Observe:

ERROR: must be owner of relation messages
SQLSTATE 42501

  1. Execute the exact same SQL from the Supabase SQL Editor as the postgres role.

  2. The policy is created successfully.

Crash report ID

No response

Docker and service versions
Docker Desktop 29.6.2
Docker Engine 29.6.2
Go version go1.26.5
API version 1.55
Additional context

Additional investigation:

  • The SQL matches the official Realtime Authorization documentation.
  • The same SQL succeeds from the SQL Editor using the postgres role.
  • The failure only occurs when executed through supabase db push.
  • No ALTER OWNER, REASSIGN OWNED or manual ownership changes have been performed.
  • Current owners:
    • realtime.messages -> supabase_realtime_admin
    • realtime schema -> supabase_admin
  • Supabase Discussion:
    https://github.com/supabase/supabase/discussions/48812

A Supabase collaborator suggested opening this issue because the problem appears specific to the CLI migration execution.

Lingua principale
TypeScript
Stelle
2.4k
Fork
533
Merge medio
1g 4h
PR unite (30g)
346

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di supabase/cli

Tutte le issue di supabase/cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.