Skip to content

Allow CREATE SUBSCRIPTION command without needing superuser privilege #1646

Closed
@burggraf

Description

@burggraf
Member

Edit: this requires PostgreSQL v17, its deployment is in progress.

Supabase currently supports:
CREATE PUBLICATION my_publication FOR ALL TABLES;

but does not support:
CREATE SUBSCRIPTION my_subscription CONNECTION '<connection_string>' PUBLICATION my_publication;

The error given is:
ERROR: 42501: must be superuser to create subscriptions

In order to be able to use logical replication to replicate individual tables (or all tables in a schema) between Supabase projects, CREATE SUBSCRIPTION should be executable by the postgres user without supseruser privileges, in parity with the CREATE PUBLICATION command.

Activity

self-assigned this
on Feb 7, 2024
ianwoodfill

ianwoodfill commented on Mar 2, 2024

@ianwoodfill

Any update here? This guide is clearly outdated if this is no longer supported: https://supabase.com/docs/guides/database/postgres/setup-replication-external

alexandredev3

alexandredev3 commented on Mar 19, 2024

@alexandredev3

Any updates on this issue? I'm having the same problem

frankyw

frankyw commented on Apr 5, 2024

@frankyw
rustamd

rustamd commented on Jun 29, 2024

@rustamd

Looking for this as well, hopefully can get implemented soon.

steve-chavez

steve-chavez commented on Jan 23, 2025

@steve-chavez
Member

This will come for free once pg 17 is supported.

t0mdicks0n

t0mdicks0n commented on Jan 30, 2025

@t0mdicks0n

I followed the same guide on how to setup replication on Supabase but superuser is needed so the guide is obsolete? At least remove that page on the docs almost 1 year after users in this thread notified you about it?

https://supabase.com/docs/guides/database/postgres/setup-replication-external

encima

encima commented on Jun 13, 2025

@encima
Member

Hey folks,

The guide there is for replicating to an external system so the subscription is created on the target database. Creating publications etc are supported without superuser permissions

Lanznx

Lanznx commented on Jun 14, 2025

@Lanznx

any update?

encima

encima commented on Jun 15, 2025

@encima
Member
added
enhancementNew feature or request
and removed
bugSomething isn't working
on Jun 18, 2025
soedirgo

soedirgo commented on Jul 7, 2025

@soedirgo
Member

Update: PG17 has now been rolled out to all regions. You can do CREATE SUBSCRIPTION by upgrading to PG17 via Project Settings > Infrastructure, so closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @burggraf@encima@steve-chavez@rustamd@frankyw

      Issue actions

        Allow CREATE SUBSCRIPTION command without needing superuser privilege · Issue #1646 · supabase/postgres