This commit is contained in:
Chris Chinchilla committed 2025-08-28 15:53:39 +02:00
1 parent 8c8d70b050
commit b5458a150f
2 files changed
+19 -18

No files matched your search

@@ -9,7 +9,7 @@ Postgres comes with built-in support for replication. If `pg_replicate` doesn't
Replication is done through _publications_. A [publication](https://www.postgresql.org/docs/current/logical-replication-publication.html) is a set of changes. You can choose which tables and change events to include in a publication.
Once a publication is created, it can be listened to by a subscriber. Subscriptions are handled using Postgres [replication slots](https://www.postgresql.org/docs/current/logical-replication-subscription.html). The exact connection parameters for the replication slot depend on your downstream subscriber. See your subscriber documentation for more details.
Once a publication is created, a subscriber can listen to it. Postgres [replication slots](https://www.postgresql.org/docs/current/logical-replication-subscription.html) handle subscriptions. The exact connection parameters for the replication slot depend on your downstream subscriber. Read your subscriber documentation for more details.
## Managing publications
@@ -11,17 +11,19 @@ description: Replicate your Supabase database to external destinations
</Admonition>
Syncing requires a source and a destination. The source is your Supabase database. The destination is a third party. See the [supported destinations](#destinations).
Syncing requires a source and a destination. The source is your Supabase database, defined in the [**Publications**](https://supabase.com/dashboard/project/_/database/publications) section of the dashboard.
The destination is a third party location, defined in the [**Replication**](https://supabase.com/dashboard/project/_/database/replication) section of the dashboard. See the [supported destinations](#destinations).
## Sources
Choose what data to sync by creating a publication in your database. A publication is a set of changes, which can be filtered by table and change type.
Choose what data to sync by creating a publication in your database. A publication is a set of changes, filtered by table and change type.
### Managing publications
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Publications** in the sidebar.
3. Control which database events are sent by toggling **Insert**, **Update**, and **Delete**.
3. Control which database events to send by toggling **Insert**, **Update**, and **Delete**.
4. Control which tables broadcast changes by selecting **Source** and toggling each table.
<video width="99%" muted playsInline controls={true}>
@@ -41,7 +43,7 @@ Currently available destinations:
#### Prerequisites
Before setting up replication to BigQuery, you'll need:
Before setting up replication to BigQuery, you need:
1. A [Google Cloud Platform (GCP)](https://cloud.google.com/gcp) account
2. A [BigQuery dataset](https://cloud.google.com/bigquery/docs/datasets-intro) in your GCP project
@@ -49,28 +51,27 @@ Before setting up replication to BigQuery, you'll need:
#### Configuring BigQuery replication
1. Navigate to the Database section in your Supabase Dashboard and select the **Replication** tab.
1. Navigate to the [Database](https://supabase.com/dashboard/project/_/database/tables) section in your Supabase Dashboard and select the **Replication** tab.
2. Click **Add destination** to open the New Destination panel.
3. Click **Enable replication**.
4. Configure your replication settings:
3. Click **Enable**.
4. Configure the replication settings:
- **Name**: Enter a descriptive name for your replication destination
- **Publication**: Select an existing publication or create a new one
- **Type**: Select "BigQuery" from the destination types
- **Project Id**: Enter your GCP project ID
- **Project's Dataset Id**: Enter the ID of your BigQuery dataset
- **Project Id**: Enter the GCP project ID
- **Project's Dataset Id**: Enter the ID of the BigQuery dataset
- **Service Account Key**: Enter your GCP service account key
5. Review the [Advanced Settings](#advanced-settings) if you need to customize the replication behavior.
5. Review the [Advanced Settings](#advanced-settings) to change the limits for the replication.
- **Max size**: Changes are sent in batches. Max size limits the size of an individual batch.
- **Max fill seconds**: Number of seconds after which a batch should be sent, even if it hasn't reached the max size.
- **Max staleness**: See BigQuery's [`max_staleness`](https://cloud.google.com/bigquery/docs/change-data-capture#manage_table_staleness) option
6. Click **Create** to start the replication process.
#### Advanced settings
- **Max size**: Changes are sent in batches. Max size limits the size of an individual batch.
- **Max fill seconds**: Number of seconds after which a batch should be sent, even if it hasn't reached the max size.
- **Max staleness**: See BigQuery's [`max_staleness`](https://cloud.google.com/bigquery/docs/change-data-capture#manage_table_staleness) option
## Monitoring replication
After setting up replication, data will begin flowing within a few minutes. You can monitor the replication status and review any errors directly from the [Supabase Dashboard](https://supabase.com/dashboard/project/_/database/replication).
After setting up replication, data begins flowing within a few minutes. You can monitor the replication status and review any errors directly from the [Supabase Dashboard](https://supabase.com/dashboard/project/_/database/replication) and clicking the **View status** button for a replication. In status view for the replication pipeline, you can also view logs by clicking the **View logs** button.
## Limitations