Allow CREATE SUBSCRIPTION command without needing superuser privilege
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.
Any update here? This guide is clearly outdated if this is no longer supported: https://supabase.com/docs/guides/database/postgres/setup-replication-external
Any updates on this issue? I'm having the same problem
Seems like subscriptions are no longer supported, period.
https://supabase.com/docs/guides/database/postgres/roles-superuser
Looking for this as well, hopefully can get implemented soon.
This will come for free once pg 17 is supported.
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
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
any update?
Yep, this is possible for the postgres user as of 17.4 and is rolling out
across regions currently
On Sat, 14 Jun 2025 at 09:15, Brandon Lu @.***> wrote:
Lanznx left a comment (supabase/postgres#1646) https://github.com/supabase/postgres/issues/1646
any update?
— Reply to this email directly, view it on GitHub https://github.com/supabase/postgres/issues/1646, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD6OI5TAZNNFP4HCFS7U3L3DO4Y7AVCNFSM6AAAAABVYO7YDKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSNZSGMZDCOJSGY . You are receiving this because you commented.Message ID: @.***>
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.
I attempted to create subscription but got this error
ERROR: 08P01: could not create replication slot "rds_sub": ERROR: must be superuser or replication role to use logical replication slots in the 'rds' namespace
@vrijmetse Are you on Postgres 17?
Ah, that error looks like a non supabase issue? You can create a normal subscription but not one for the RDS namespace
EDIT:
can confirm this is not a Supabase issue. The slot in the other DB may need superuser perms to create. You can precreate the slot and specify or you can use rds_superuser