Use this guide when upgrading Replicant, its PostgreSQL source, or the output plugin. For a source or plugin cutover, preserve the checkpoint on the same source.
Correct start options
Compare the options you pass to Replicant.start_link/1 with its options table.
Remove unknown keys and correct misspellings such as orign: to origin:.
Keep one entry per key, including in Replicant-owned nested settings. If you
combine options from multiple lists, use Keyword.merge/2 to choose the
precedence explicitly.
Set go_forward_only: to true or false. Omit it to use the false default.
Adapters must pass a boolean when forwarding go_forward_only: to Replicant.
Pass Postgrex options as keyword lists for both source and checkpoint
connections. Omit checkpoint_store[:table] or checkpoint_store[:progress_table]
to use the default table name. When supplied, each must be a valid PostgreSQL
identifier.
Migrate backpressure alerts
- Replace
:sink_too_slowalerts with[:replicant, :connection, :stalled]. The event reports outstanding assembler work with no completed frames for five seconds, whether intake is paused or still receiving. - Treat
[:replicant, :connection, :disconnected]as a connection signal with empty measurements and metadata. For stalled work, use theduration,change_count, andbyte_sizefrom the:stalledevent. - Size
max_inflight_lagfor queued payload and retained transaction data. Monitor PostgreSQL slot retention usingpg_replication_slots.restart_lsnand source disk usage. Setmax_slot_wal_keep_sizeto the source's retention budget. Exceeding that limit can invalidate a lagging slot at a checkpoint. - Use the recovery guide for a slot invalidation or retained payload exhaustion.
Change the PostgreSQL source version or output plugin
- Check compatibility before upgrading the server or starting the pipeline against it.
- Replace
decoder: :wal2jsonand itstables:,allow_keyless_tables:andschema_check_interval:options with a pgoutput configuration. Create a publication and verify its table and operation coverage. A pglogical pipeline keepsreplication_sets:. - Quiesce writes to the source, drain the old pipeline through its last committed change, and persist its checkpoint. Create a new pgoutput slot while writes are quiesced. A logical slot keeps its original output plugin.
- Confirm the new slot's consistent point covers the cutover and reconcile it with the sink's checkpoint before resuming writes and consumption. Keep checkpoint positions bound to their source and leave unverified WAL intervals unacknowledged.
For a state mirror, a fresh snapshot can rebuild current state. For an append log, preserve the prior history through the handoff or reconcile it using independently retained records before advancing the checkpoint. See ADR-0010 for the support decision and snapshot coverage for backfill behavior.
Change the replication origin mode
- Stop the pipeline and record the sink's durable checkpoint and the slot's confirmed flush LSN. Compare the old and new modes.
- Reconcile the sink against the intended coverage before resuming, or reseed
a state mirror if reconciliation requires a fresh snapshot. Widening from
:noneto:anycannot recover changes the source already filtered and the pipeline acknowledged. Restore missing append-log history from retained records. - Restart with the new mode after verifying that the sink and source agree at the cutover. Check snapshot coverage before using a reseed for local-only delivery.