Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -1154,14 +1154,6 @@ export const database: NavMenuConstant = {
name: 'Setting up',
url: '/guides/database/replication/replication-setup' as `/${string}`,
},
{
name: 'Destinations',
url: '/guides/database/replication/replication-destinations' as `/${string}`,
items: [
{ name: 'BigQuery', url: '/guides/database/replication/replication-bigquery' },
{ name: 'Iceberg', url: '/guides/database/replication/replication-iceberg' },
],
},
{
name: 'Monitoring',
url: '/guides/database/replication/replication-monitoring' as `/${string}`,
Expand All @@ -1170,7 +1162,7 @@ export const database: NavMenuConstant = {
],
},
{
name: 'Manual Replication',
name: 'Manual replication',
url: '/guides/database/replication/manual-replication-setup' as `/${string}`,
items: [
{
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/guides/database/replication.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: 'replication'
title: 'Database Replication'
description: 'Replicate your database to external destinations using replication powered by Supabase ETL or manual replication.'
description: 'Replicate your database to external destinations using Supabase replication or manual replication.'
subtitle: 'An introduction to database replication and change data capture.'
sidebar_label: 'Overview'
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: 'replication-faq'
title: 'Replication FAQ'
id: 'manual-replication-faq'
title: 'Manual Replication FAQ'
description: 'Frequently asked questions about manual database replication.'
subtitle: 'Common questions and considerations when setting up manual replication.'
sidebar_label: 'FAQ'
Expand Down Expand Up @@ -30,13 +30,15 @@ You can view [publications](/dashboard/project/default/database/publications) in

## How to configure database settings for replication?

Yes. Using the Supabase CLI, you can [configure database settings](/docs/guides/database/custom-postgres-config#cli-configurable-settings) to optimize them for your replication needs. These values can vary depending on the activity of your database size and activity.
Using the Supabase CLI, you can [configure database settings](/docs/guides/database/custom-postgres-config#cli-configurable-settings) to optimize them for your replication needs. These values can vary depending on your database size and activity.

## What are some important configuration options?

Some of the more important options to be aware of are:

- `max_wal_size`
- `max_slot_wal_keep_size`
- `wal_keep_size`
- `max_wal_senders`
- `max_wal_size` - Maximum size the WAL can grow between automatic WAL checkpoints
- `max_slot_wal_keep_size` - Maximum size of WAL files that replication slots are allowed to retain
- `wal_keep_size` - Minimum number of past WAL files to keep for standby servers
- `max_wal_senders` - Maximum number of concurrent connections from standby servers or streaming backup clients

These settings help ensure your replication slots don't run out of space and that replicas can reconnect without requiring a full re-sync.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: 'monitoring-replication'
title: 'Monitoring Replication'
id: 'manual-replication-monitoring'
title: 'Manual Replication Monitoring'
description: 'Monitor replication lag and status for manual replication setups.'
subtitle: 'Track replication health and performance.'
sidebar_label: 'Monitoring'
Expand All @@ -16,7 +16,7 @@ Monitoring replication lag is important and there are 3 ways to do this:
3. [Metrics](/docs/guides/telemetry/metrics) - Using the prometheus endpoint for your project
- replication_slots_max_lag_bytes - this is the more important one
- pg_stat_replication_replay_lag - lag to replay WAL files from the source DB on the target DB (throttled by disk or high activity)
- pg_stat_replication_send_lag - lag in sending WAL files from the source DB (a high lag means that the publisher is not being asked to send new WAL files OR a network issues)
- pg_stat_replication_send_lag - lag in sending WAL files from the source DB (a high lag means that the publisher is not being asked to send new WAL files OR network issues)

### Primary

Expand Down Expand Up @@ -51,7 +51,7 @@ The WAL size can be checked using the `pg_ls_waldir()` function:
select * from pg_ls_waldir();
```

#### Check LSN
#### Check the LSN

```sql
select pg_current_wal_lsn();
Expand Down Expand Up @@ -91,7 +91,7 @@ ORDER BY
table_name;
```

#### Check LSN
#### Check the LSN

```sql
select pg_last_wal_replay_lsn();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ subtitle: 'Set up replication with Airbyte, Estuary, Fivetran, and other tools.'
sidebar_label: 'Setting up'
---

This guide covers setting up **manual replication** using external tools. If you prefer a simpler, managed solution, see [replication](/docs/guides/database/replication/replication-setup) instead.
This guide covers setting up **manual replication** using external tools. If you prefer a simpler, managed solution, see [Replication](/docs/guides/database/replication/replication-setup) instead.

<Admonition type="note">

Expand All @@ -21,15 +21,15 @@ To set up replication, the following is recommended:
- Instance size of XL or greater
- [IPv4 add-on](/docs/guides/platform/ipv4-address) enabled

To create a replication slot, you will need to use the `postgres` user and follow the instructions in our [guide](/docs/guides/database/postgres/setup-replication-external).
To create a replication slot, you will need to use the `postgres` user and follow the instructions in the [external replication setup guide](/docs/guides/database/postgres/setup-replication-external).

<Admonition type="note">

If you are running Postgres 17 or higher, you can create a new user and grant them replication permissions with the `postgres` user. For versions below 17, you will need to use the `postgres` user.

</Admonition>

If you are replicating to an external system and using any of the tools below, check their documentation first and we have added additional information where the setup with Supabase can vary.
If you are replicating to an external system and using any of the tools below, check their documentation first. Additional information is provided where the setup with Supabase can vary.

<Tabs
scrollable
Expand Down Expand Up @@ -67,7 +67,7 @@ You can follow those steps with the following modifications:

1. In Step 2, choose `logical replication` as the sync mechanism
2. In Step 3, do not create a user and use the existing `postgres` user for replication
3. In Step 5, no need to modify any WAL settings as we have done that for you
3. In Step 5, no need to modify any WAL settings as this has been configured

</TabPanel>

Expand All @@ -77,7 +77,7 @@ Materialize has the following [documentation](https://materialize.com/docs/sql/c

You can follow those steps with the following modifications:

1. Follow the steps in our [guide](/docs/guides/database/postgres/setup-replication-external) to create a publication slot
1. Follow the steps in the [external replication setup guide](/docs/guides/database/postgres/setup-replication-external) to create a publication slot

</TabPanel>

Expand Down
126 changes: 0 additions & 126 deletions apps/docs/content/guides/database/replication/replication-bigquery.mdx

This file was deleted.

This file was deleted.

Loading
Loading