Rows skipped due to message size limits
Artie’s replication pipeline enforces a maximum message size per row to protect the underlying Kafka broker from out-of-memory conditions. The default limit is 2MB per CDC event. This limit can be raised up to 15MB. Contact the Artie team if your workload requires a higher threshold.With
REPLICA IDENTITY FULL, an update’s CDC event carries both the before and after image of the row, so its size can double in transit. A 1.1 MB row can produce a 2.2 MB event that exceeds the limit. With the default replica identity, the before image holds at most the key columns.row.skipped webhook event. See Webhooks to set up real-time alerts.
How to identify at-risk tables
Run these queries against your source PostgreSQL database. First, find the largest tables:my_schema.my_table with the table name:
Mitigations
- Message compression: set Message compression to GZIP on the pipeline’s Source tab, or set
message_compression = "gzip"onartie_source_reader(Terraform provider v2.3.34 and later). Artie then gzips each message of 500 KB or more before the size check. See message compression. - Exclude large columns: exclude binary blobs or encrypted payloads not needed in the destination. See column exclusion guide.
- Webhook notifications: receive real-time alerts when a row is skipped, including table name and primary key. See Webhooks.
Replication slot too large and not decreasing
A growing replication slot means PostgreSQL is retaining WAL segments that have not yet been consumed. If the slot size keeps increasing and never decreases, the retained WAL can eventually exhaust disk space.Symptoms
- Replication slot size is growing continuously
- WAL disk usage is increasing or triggering storage alerts
- The
retained_walvalue from the diagnostic query below keeps climbing
Diagnosing the issue
Check your replication slot size and status:Common causes and resolutions
Long-running transactions
Long-running transactions
Long-running or idle-in-transaction sessions prevent PostgreSQL from advancing the replication slot past their transaction boundary.Resolution: Terminate the blocking session and consider setting
idle_in_transaction_session_timeout to automatically kill idle transactions.Idle database without heartbeats enabled
Idle database without heartbeats enabled
On idle databases (especially AWS RDS), WAL segments accumulate because there are no changes for the replication slot to consume. RDS writes internal heartbeats to
rdsadmin every 5 minutes, generating ~18 GB of WAL per day on an otherwise idle instance.Resolution: Enable heartbeats in Artie to periodically advance the replication slot. See Enabling heartbeats for setup instructions.For RDS-specific details, see Preventing WAL growth on RDS.Pipeline is paused or unhealthy
Pipeline is paused or unhealthy
If the pipeline is Paused or failing, Artie doesn’t read from the replication slot and WAL builds up. With Delivery paused, Artie keeps reading, so the slot still advances.Resolution: Check the pipeline status in the Artie dashboard and resume or re-deploy it.
max_slot_wal_keep_size is not configured
max_slot_wal_keep_size is not configured
By default,
max_slot_wal_keep_size is set to -1 (unlimited), meaning PostgreSQL will retain WAL indefinitely for a slot. This can lead to unbounded disk growth.Resolution: Set max_slot_wal_keep_size to a reasonable value to cap WAL retention. Note that if the limit is reached, PostgreSQL will invalidate the slot (see Replication slot lost below).Replication slot lost
A lost replication slot means the slot was either dropped or invalidated, so the pipeline can no longer stream changes from where it left off.Symptoms
- Pipeline errors indicating the replication slot does not exist
- Errors referencing WAL segments that have been removed
pg_replication_slotsreturns no rows for your slot, or showswal_status = 'lost'
Diagnosing the issue
Check whether the slot still exists and its status:max_slot_wal_keep_size setting:
Common causes and resolutions
Slot invalidated by max_slot_wal_keep_size
Slot invalidated by max_slot_wal_keep_size
This is often a consequence of the slot growing too large (see Replication slot too large above). When
max_slot_wal_keep_size is configured, PostgreSQL will invalidate any slot whose retained WAL exceeds the limit.Resolution: An invalidated slot still exists, so redeploying alone reuses it. Drop the slot first with SELECT pg_drop_replication_slot('artie'); (use your slot name override instead of artie if you set one). Then redeploy the pipeline in Artie so it creates a new slot, and trigger a backfill to re-sync your data. To prevent this from happening again, enable heartbeats to keep the slot advancing. See Enabling heartbeats.Manual slot deletion
Manual slot deletion
Someone manually dropped the replication slot using
pg_drop_replication_slot().Resolution: Re-deploy the pipeline in Artie to recreate the slot, then trigger a backfill.Database failover
Database failover
During a failover event (especially on Amazon Aurora), replication slots on the old primary are not automatically carried over to the new primary.Resolution: Re-deploy the pipeline in Artie to create a new replication slot on the new primary, then trigger a backfill to re-sync data.
Provider-specific WAL retention limits
Provider-specific WAL retention limits
Some managed PostgreSQL providers impose their own WAL retention limits that can cause slot invalidation independently of
max_slot_wal_keep_size.Resolution: Check your provider’s documentation for WAL retention policies. If pg_replication_slots still lists the slot with wal_status = 'lost', drop it first with pg_drop_replication_slot(). Then redeploy the pipeline and trigger a backfill to recover. Enable heartbeats to keep the slot active and prevent future invalidation. See Enabling heartbeats.Connection terminated by administrator command
If Artie logs show a connection error like:pg_terminate_backend() on Artie’s replication connection.
Replication: Artie will automatically reconnect and resume from where it left off. No data is lost, but repeated terminations cause unnecessary restarts and latency spikes.
Backfills: Backfills do not recover automatically. A terminated backfill connection will cause the backfill job to fail and must be manually re-triggered from the Artie dashboard.
A separate connection reaper is terminating Artie's session
A separate connection reaper is terminating Artie's session
The most common cause is a connection management tool (PgBouncer, an in-house idle connection reaper, or a monitoring script) configured to terminate long-lived or idle-looking sessions. Replication connections are persistent by design. They appear idle between commits, which makes them a common false-positive target for reapers.Resolution: Identify the tool or script calling
pg_terminate_backend() and exclude Artie’s replication user or walsender backend type from its termination logic.Database restart or failover
Database restart or failover
A database restart (planned maintenance, provider-initiated restart, or failover) will terminate all active connections with this error.Resolution: No action needed for replication. Artie will reconnect automatically. For backfills, re-trigger them from the Artie dashboard once the database is back up.
Setting max_slot_wal_keep_size
max_slot_wal_keep_size caps how much WAL Postgres retains for a replication slot before invalidating it. Treat this as a break-glass mechanism: if the limit is hit, the slot is invalidated and a full backfill is required to recover.
When choosing a value, consider:
- Your database size: larger databases generate more WAL and need more headroom.
- Historical slot size: check how large your slot has grown during normal operations and past incidents (pipeline pauses, long-running transactions, etc.).
- Set it high enough that you don’t have to think about it: aim for at least 3-5x your observed peak slot size.

