Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: Update Realtime Nav constants (#25967)

karlofc99675c4d8b
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
index 976a4c4eee7..40c56c92604 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
@@ -1284,12 +1284,7 @@ export const realtime: NavMenuConstant = {
items: [
{ name: 'Quotas', url: '/guides/realtime/quotas' },
{ name: 'Architecture', url: '/guides/realtime/architecture' },
- { name: 'Message Protocol', url: '/guides/realtime/protocol' },
- {
- name: 'Bring Your Own Database',
- url: '/guides/realtime/bring-your-own-database',
- items: [],
- },
+ { name: 'Message Protocol', url: '/guides/realtime/protocol', items: [] },
],
},
],
diff --git a/apps/docs/content/guides/realtime/bring-your-own-database.mdx b/apps/docs/content/guides/realtime/bring-your-own-database.mdx
deleted file mode 100644
index 3ed30013e0d..00000000000
--- a/apps/docs/content/guides/realtime/bring-your-own-database.mdx
+++ /dev/null
@@ -1,103 +0,0 @@
----
-id: 'bring-your-own-database'
-title: 'Bring Your Own Database'
-description: 'Bring your own Postgres database to subscribe to Realtime changes'
-sidebar_label: 'Bring Your Own Database'
----
-
-Realtime Database Changes works with any Postgres database that has logical replication enabled and the [wal2json](https://github.com/eulerto/wal2json) extension installed.
-
-<Admonition type="note">
-
-After setting up your database for Realtime, [submit a support ticket](https://supabase.com/dashboard/support/new) if you want to use your database with hosted Supabase Realtime.
-
-</Admonition>
-
-The following steps will make sure that your database is properly set up to work with Realtime.
-
-## `wal2json` Extension
-
-Realtime relies on the `wal2json` Postgres extension to format database changes to JSON which are then sent to Realtime subscribers.
-
-Postgres databases managed by AWS RDS and Google Cloud SQL should already have `wal2json` installed.
-Please check to make sure this is indeed the case with your Postgres database.
-
-## Logical replication configuration
-
-Realtime relies on Postgres' logical replication functionality to get database changes. Please enable logical replication on your database and configure the following settings:
-
-- `max_replication_slots`: we recommend `10` because Realtime requires a few slots plus the slots you'll need for your non-Realtime logical replication needs.
-- `max_slot_wal_keep_size`: we recommend `1024` (MB) so Realtime can attempt to deliver more database changes stored in Postgres.
-
-See [Compute Add-ons](/docs/guides/platform/compute-add-ons#postgres-replication-slots-and-wal-senders) for the recommended `max_replication_slots` at different instance sizes based on the values we use for our own cloud offering.
-
-## Realtime database setup
-
-### `supabase_realtime` Publication
-
-Create `supabase_realtime` publication and add tables you want Realtime to listen to:
-
-```sql
-create publication supabase_realtime with (publish = 'insert, update, delete');
-
-alter publication supabase_realtime add table messages, users;
-```
-
-<Admonition type="tip">
-
-If the payload contains a `401 Unauthorized` then you will need to grant `select` privileges to the table for the database role you want to authorize to receive database changes:
-
-```sql
-grant select on table messages to anon;
-```
-
-</Admonition>
-
-### `realtime` Schema
-
-Create a `realtime` schema:
-
-```sql
-create schema realtime;
-```
-
-### `supabase_realtime_admin` Role
-
-Create a `supabase_realtime_admin` database role and grant it replication permissions:
-
-```sql
-create role supabase_realtime_admin with noinherit login password 'secure-password';
-```
-
-Make sure to grant `supabase_realtime_admin` role with replication permissions. This step will vary based on your database provider.
-
-For example, if your database is managed by AWS RDS then you can run:
-
-```sql
-grant rds_replication to supabase_realtime_admin;
-```
-
-### `supabase_realtime_admin` Privileges
-
-Grant `supabase_realtime_admin` privileges for `realtime` schema and all related Realtime objects:
-
-```sql
-grant all on schema realtime to supabase_realtime_admin;
-grant all on all tables in schema realtime to supabase_realtime_admin;
-grant all on all sequences in schema realtime to supabase_realtime_admin;
-grant all on all routines in schema realtime to supabase_realtime_admin;
-```
-
-### `authenticated` Role
-
-Create an `authenticated` role:
-
-```sql
-create role authenticated nologin noinherit;
-```
-
-<Admonition type="note">
-
-This role is hardcoded into Realtime migrations so it's required for the time being.
-
-</Admonition>