# Resolve common errors with real-time sync to Postgres

Diagnose connection and syncing issues with your Postgres pipeline.

Use this guide to diagnose and resolve issues with your real-time sync to Postgres while setting up a connection or after Stripe establishes your pipeline.

## Set up your initial connection 

Check the following common questions when you connect your Postgres database to Stripe for the first time.

### Find your connection URL 

If you use Supabase, find your connection string in the Supabase Dashboard:

1. Open the [Supabase Dashboard](https://supabase.com/dashboard), then select your project.

2. Click **Connect** at the top of the project page.

3. In the **Connection string** section, select **URI**, then select **Session pooler** as the connection method. The session pooler provides the IPv4 endpoint that Stripe requires. Don’t select **Direct connection** unless your Supabase project has the IPv4 add-on.

4. Copy the connection string. It has the following format:

   ```text
   postgresql://postgres.{{PROJECT_REFERENCE}}:{{YOUR_PASSWORD}}@aws-0-{{REGION}}.pooler.supabase.com:5432/postgres?sslmode=require
   ```

5. Replace `postgres` at the beginning of the username and the password with the credentials for the [dedicated Stripe user](https://docs.stripe.com/data/data-pipeline/real-time-sync-to-postgres/configure.md#user-permissions). Keep the `.{{PROJECT_REFERENCE}}` suffix in the username.

6. Enter the updated connection string when you [connect your database in the Stripe Dashboard](https://docs.stripe.com/data/data-pipeline/real-time-sync-to-postgres/configure.md#connect-dashboard).

> Your connection string contains database credentials. Store it securely, and don’t share it outside the Stripe Dashboard.

## Debug issues after your pipeline is established 

Use this section to diagnose issues that occur after Stripe successfully connects to your database and establishes your pipeline.

### The pipeline shows a sync error 

If the [Pipelines](https://dashboard.stripe.com/data-management/pipelines) page shows a **Sync error** status, confirm that Stripe can still write to your database:

- Check your database provider’s status page for an outage.
- Confirm that the database is running and has available storage and connections.
- Confirm that your firewall or network rules still allow [all Stripe source IP addresses](https://docs.stripe.com/data/data-pipeline/real-time-sync-to-postgres/configure.md#source-ip-addresses).
- Confirm that the Stripe database user’s password hasn’t changed and that the user still has the [required permissions](https://docs.stripe.com/data/data-pipeline/real-time-sync-to-postgres/configure.md#user-permissions).
- If you rotated or renewed your database’s SSL certificate, confirm that the CA certificate configured for your pipeline is still valid.
- Confirm that no one modified or dropped the Stripe-managed schema or tables.

If the error persists, [contact Stripe support](https://support.stripe.com/contact/email?topic=third_party_integrations&subject=Stripe%20Data%20Pipeline%20\(SDP\)). Include your pipeline name, when the error began, and any recent database configuration changes. Don’t include your connection string, password, or certificate private keys.

### The pipeline is active, but data isn’t updating 

To investigate data that appears stale or missing:

1. On the [Pipelines](https://dashboard.stripe.com/data-management/pipelines) page, confirm that the pipeline is **Active** and that the affected table is selected for syncing.
2. Confirm that the Stripe resource supports a list endpoint. Real-time sync only includes [resources with public API list endpoints](https://docs.stripe.com/data/data-pipeline/real-time-sync-to-postgres.md#data-availability).
3. Check whether the source object was recently created or updated in Stripe, and allow time for recent changes to sync.
4. Confirm that no external process writes to or changes the Stripe-managed schema or tables.

If the affected data remains stale, [contact Stripe support](https://support.stripe.com/contact/email?topic=third_party_integrations&subject=Stripe%20Data%20Pipeline%20\(SDP\)). Include your pipeline name, the affected table, example Stripe object IDs, and the approximate time that you expected the updates. Don’t include database credentials.

### The pipeline is still backfilling 

The initial backfill time depends on the amount of data selected for syncing and the capacity of your database. While the pipeline is **Backfilling**:

- Keep the database available to Stripe.
- Confirm that it has available storage and connections.
- Don’t modify Stripe-managed schemas or tables.

If the status doesn’t change or the pipeline changes to **Sync error**, complete the [sync error checks](https://docs.stripe.com/data/data-pipeline/real-time-sync-to-postgres/common-errors.md#pipeline-sync-error). If you still need help, [contact Stripe support](https://support.stripe.com/contact/email?topic=third_party_integrations&subject=Stripe%20Data%20Pipeline%20\(SDP\)) with your pipeline name and the approximate time that the backfill started.
