Many questions about how Postgres replication works — including TOAST columns, replication slots, publications, schema changes, and data type mappings — are covered in the ClickPipes for Postgres FAQ. The information there applies to ClickHouse Managed Postgres migrations as well.
I’m seeing an “invalid input value for enum” error during replication
This error occurs when the source Postgres has an enum value that doesn’t exist on the target ClickHouse Managed Postgres. Logical replication doesn’t automatically propagate ALTER TYPE ... ADD VALUE commands, so new enum values added on the source after the initial schema setup will cause inserts to fail on the target.
To fix this, add the missing value to the enum type on the target Postgres:
Replace your_enum_type with the name of your enum type and 'new_value' with the missing value from the error message.
I’m seeing a unique constraint or check constraint violation error during replication
Constraint violations can occur during logical replication when the replication order causes a conflict with an existing constraint on the target.
- Unique constraints: CDC workloads may replay operations that temporarily violate uniqueness before a subsequent update resolves it.
- Check constraints: A check constraint on the target may be stricter than the source, or an intermediate state during replication may not satisfy the constraint.
To unblock replication, drop the offending constraint on the target Postgres:
You can find the constraint details using the name from the error message:
Re-add the constraints during cutover, once replication is complete and the source is no longer active:
Last modified on August 4, 2026