Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions core/connectors/sources/postgres_source/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ LIMIT $limit

### Delete After Read

Deletes rows from the source table after successful processing:
Deletes rows from the source table only after Iggy acknowledges the batch:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worth documenting the window: state is persisted before the delete runs, so a crash/shutdown/timeout in between leaves rows delivered but never deleted, and the advanced offset means they are never picked up again.


```toml
[plugin_config]
Expand All @@ -219,7 +219,7 @@ primary_key_column = "id"

### Mark as Processed

Updates a boolean column instead of deleting:
Updates a boolean column after Iggy acknowledges the batch instead of deleting:

```toml
[plugin_config]
Expand Down Expand Up @@ -267,15 +267,20 @@ tables = ["users", "orders"]
capture_operations = ["INSERT", "UPDATE", "DELETE"]
```

The connector peeks at logical changes and advances the replication slot only

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worth one sentence on cost: advancing the slot re-decodes the same wal range (fast-forward), so each acked batch pays two decode passes.

after Iggy acknowledges the batch. A failed delivery leaves the slot unchanged
so the next poll can read the same changes again.

The `pg_replicate` backend requires the `cdc_pg_replicate` feature flag at build time.

### Slot Naming

Each CDC connector must use a unique `replication_slot`. Setup accepts any
pre-existing `test_decoding` slot, so two connectors pointed at the same
database with the default `replication_slot = "iggy_slot"` will silently
share one slot. `pg_logical_slot_get_changes` consumes changes on read, so
each connector only sees a subset of the other's changes instead of erroring.
share one slot. Each connector peeks from and advances the same slot after
delivery, so one connector can move the shared position past changes that the
other has not processed.
Set an explicit, distinct `replication_slot` per connector instance.

### Decommissioning
Expand Down
Loading
Loading