advance_slot
Advance a PostgreSQL logical replication slot to a specified LSN, discarding all changes before that point. Requires exact slot name and target LSN; dry-run by default.
Instructions
Advance a replication slot to an EXPLICIT LSN (irreversible).
Moves the slot's confirmed position forward, discarding all changes
before to_lsn. You must pass the exact slot name and target LSN — there
is no advance-to-latest shortcut. Dry-run unless allow_writes=true AND
the server was started with PG_LOGICAL_MCP_ALLOW_WRITES set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_lsn | Yes | ||
| slot_name | Yes | ||
| allow_writes | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||