> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arcyria.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CDC troubleshooting

> Common PostgreSQL CDC errors and how to fix them.

A failed run's page shows the error and, for the errors below, a **Fix** line.
A failed CDC run never confirms changes on the source, so the next run retries
the same batch.

| Error | Cause | Fix |
| - | - | - |
| `WAL_LEVEL_NOT_LOGICAL` | Logical decoding is off. | Set `wal_level = logical` (RDS/Aurora: `rds.logical_replication = 1`; Cloud SQL: `cloudsql.logical_decoding = on`) and restart. |
| `INSUFFICIENT_PRIVILEGE` | The user cannot use replication slots. | Grant `REPLICATION` (RDS/Aurora: `GRANT rds_replication`; Cloud SQL: `ALTER USER ... WITH REPLICATION`). |
| `POOLER_DETECTED` | The connection goes through a pooler. | Use the direct host and port. Supabase: **Connect → Direct connection**. |
| `NO_FREE_REPLICATION_SLOTS` | `max_replication_slots` is used up. | Drop unused slots or raise the limit and restart. |
| `SLOT_EXISTS` | A slot with this pipeline's name belongs to something else. | Drop that slot on the source, then enable CDC again. |
| `SLOT_IN_USE` | Another connection is reading the slot. | Wait for the other run, or stop the other consumer. |
| `SLOT_INVALIDATED` | The source removed WAL the slot needed, for example because `max_slot_wal_keep_size` was reached. | **Change data capture → Re-snapshot**. |
| `SLOT_MISSING` | The slot was dropped outside Arcyria. | **Change data capture → Re-snapshot**. |
| `PUBLICATION_MISSING` | The publication does not exist. | Run the setup SQL from the CDC panel. |
| `PUBLICATION_MISSING_TABLE` | A CDC table is not in the publication, so its changes are not captured. | Run the `ALTER PUBLICATION ... ADD TABLE` statement shown in the error. |
| `TRUNCATE_DETECTED` | A TRUNCATE was captured and the stream's truncate policy is **Stop and ask**. | Choose **Ignore** or **Truncate the destination** in the stream's options, then run again. |
| `SCHEMA_CHANGE_DETECTED` | Source columns changed under the **Fail the run** policy. | Update the model or destination, then **Accept source schema** on the stream. |
| `CDC_KEY_MISSING` | The table has no primary key and no merge key. | Add a primary key, or set a merge key (a unique NOT NULL index). |

## Re-snapshot

Re-snapshot recovers from an invalidated or missing slot:

1. It clears the progress of every CDC stream, so each one reloads.
2. It drops the old slot.
3. It creates a new slot.

Destination rows are upserted, so reloading does not duplicate them.

## Slot keeps growing

If the slot's held WAL keeps growing:

* make sure CDC runs are scheduled and succeeding;
* check that the destination accepts the deliveries;
* consider the heartbeat helper for quiet databases.

If the source must reclaim disk immediately, disable CDC to drop the slot.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.