fix_sequences
Reset serial/identity sequences that lag behind column maximums, fixing duplicate-key errors after dumps. Dry run by default; apply: true executes changes.
Instructions
Reset serial/identity sequences that have fallen behind MAX(column) — the duplicate-key state a dump leaves behind. Defaults to a dry run; pass apply: true to write.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Connection name or id (exact when apply: true) | |
| apply | No | Actually run setval (default false = dry run) | |
| table | No | Only this table | |
| schema | No | Schema (default: connection schema or public) |