You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "davidzollo (via GitHub)" <gi...@apache.org> on 2026/04/16 13:34:40 UTC
[I] [Feature][Connector-V2][PostgreSQL-CDC] Support schema evolution [seatunnel]
davidzollo opened a new issue, #10777:
URL: https://github.com/apache/seatunnel/issues/10777
### Search before asking
I searched existing issues with keywords including `Postgres CDC schema evolution`, `PostgreSQL CDC schema evolution`, `Postgres-CDC SupportSchemaEvolution`, and `Postgres CDC DDL`.
I found some closed umbrella/design issues such as CDC DDL sync design, but did not find an open issue that specifically tracks PostgreSQL CDC source schema evolution implementation.
### What would you like to be added?
PostgreSQL CDC source should support schema evolution, similar to MySQL CDC and Oracle CDC.
Currently, `PostgresIncrementalSource` only implements `SupportParallelism`:
```java
public class PostgresIncrementalSource<T> extends IncrementalSource<T, JdbcSourceConfig>
implements SupportParallelism {
```
In contrast, MySQL CDC and Oracle CDC implement `SupportSchemaEvolution` and set a `SchemaChangeResolver` in the Debezium deserialization schema builder.
PostgreSQL CDC currently builds `SeaTunnelRowDebeziumDeserializeSchema` without a schema change resolver:
```java
return (DebeziumDeserializationSchema<T>)
SeaTunnelRowDebeziumDeserializeSchema.builder()
.setTables(catalogTables)
.setServerTimeZone(ZoneId.of(zoneId))
.setTableIdTableChangeMap(tableIdTableChangeMap)
.build();
```
As a result, PostgreSQL CDC cannot convert PostgreSQL DDL records into SeaTunnel `SchemaChangeEvent`s in the same way as MySQL/Oracle CDC.
### Why is this needed?
PostgreSQL CDC is an important CDC source. In real CDC pipelines, users often need to synchronize both data changes and table schema changes.
Without PostgreSQL CDC schema evolution support:
1. PostgreSQL CDC pipelines cannot perform end-to-end DDL synchronization.
2. Downstream sinks that already support schema evolution cannot benefit from PostgreSQL source DDL events.
3. Multi-table PostgreSQL CDC jobs require more manual schema maintenance.
4. The CDC schema evolution capability is inconsistent across MySQL, Oracle, and PostgreSQL sources.
### Suggested implementation direction
Contributors are very welcome to help implement this.
A possible implementation plan:
1. Add a `PostgresSchemaChangeResolver`, similar to `MySqlSchemaChangeResolver` and `OracleSchemaChangeResolver`.
2. Wire the resolver into `PostgresIncrementalSource#createDebeziumDeserializationSchema`.
3. Make `PostgresIncrementalSource` implement `SupportSchemaEvolution`.
4. Define supported schema change types, at least:
- add column
- drop column
- rename column
- modify/update column
5. Add parser and resolver tests for PostgreSQL DDL.
6. Add integration/e2e coverage if possible, such as PostgreSQL CDC -> JDBC/Paimon/Iceberg sink with schema changes enabled.
7. Update documentation for PostgreSQL CDC schema evolution support and limitations.
### Open questions
1. Which PostgreSQL DDL variants should be supported in the first phase?
2. Should table rename and comment-related DDL be handled in the same PR or follow-up PRs?
3. How should unsupported PostgreSQL DDL be reported to users?
4. Which sink should be used for the first end-to-end test?
### Compatibility
This can be introduced as an additive feature. Existing PostgreSQL CDC behavior should remain unchanged unless users enable schema evolution and the selected sink supports applying schema changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Feature][Connector-V2][PostgreSQL-CDC] Support schema evolution [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10777:
URL: https://github.com/apache/seatunnel/issues/10777#issuecomment-4292762874
This is a valid PostgreSQL CDC schema evolution feature gap rather than a bug in the current PostgreSQL CDC runtime behavior.
The important difference is that PostgreSQL CDC currently does not expose the same schema-change path as MySQL / Oracle CDC: `PostgresIncrementalSource` does not implement `SupportSchemaEvolution`, and the Debezium deserialization schema is built without a PostgreSQL-specific `SchemaChangeResolver`. So downstream sinks that can apply schema changes cannot receive PostgreSQL DDL events through the same SeaTunnel schema evolution path today.
I would suggest keeping the first implementation small:
1. add a PostgreSQL schema change resolver
2. wire it into `PostgresIncrementalSource`
3. support a limited first set of DDL events, such as add / drop / rename / modify column
4. add parser / resolver tests for PostgreSQL DDL
5. document unsupported PostgreSQL DDL variants clearly
Table rename, comment-only changes, and more dialect-specific DDL can be handled in follow-up PRs. This should stay open as an additive feature request, and a focused PR for the first resolver slice would be very welcome.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Feature][Connector-V2][PostgreSQL-CDC] Support schema evolution [seatunnel]
Posted by "dybyte (via GitHub)" <gi...@apache.org>.
dybyte commented on issue #10777:
URL: https://github.com/apache/seatunnel/issues/10777#issuecomment-5137021954
I'm very interested in this issue
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Feature][Connector-V2][PostgreSQL-CDC] Support schema evolution [seatunnel]
Posted by "hongbo-miao (via GitHub)" <gi...@apache.org>.
hongbo-miao commented on issue #10777:
URL: https://github.com/apache/seatunnel/issues/10777#issuecomment-5188256052
This feature would also be very helpful for our setup using Apache SeaTunnel with PostgreSQL as a source. Looking forward to seeing this land soon, thanks! ☺️
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Feature][Connector-V2][PostgreSQL-CDC] Support schema evolution [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on issue #10777:
URL: https://github.com/apache/seatunnel/issues/10777#issuecomment-5366239687
Thanks for the well-researched request. This is a valid gap: PostgresIncrementalSource does not implement SupportSchemaEvolution, unlike MySQL/Oracle CDC. Marking as a feature and welcoming contributions.
Note a key technical challenge: unlike MySQL binlog, PostgreSQL logical replication does not emit DDL events natively, so the implementation will need a strategy for detecting schema changes (e.g., comparing table schemas when replication messages indicate structure drift). Any proposal should describe this approach.
If you or anyone plans to work on this, please share a short design first (which DDL types will be supported: add/drop/rename/modify column, and how DDL detection works for Postgres) so maintainers can review before implementation.
<!-- streview-comment:412 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Feature][Connector-V2][PostgreSQL-CDC] Support schema evolution [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10777:
URL: https://github.com/apache/seatunnel/issues/10777#issuecomment-5137972222
Thanks for the interest.
This is still a useful PostgreSQL CDC feature gap to work on, and the safest first slice is the same narrow scope described earlier:
1. add a PostgreSQL-specific schema change resolver;
2. wire it into `PostgresIncrementalSource` so PostgreSQL DDL can enter the existing SeaTunnel schema-evolution path;
3. keep the first PR limited to a small supported set such as add / drop / rename / modify column;
4. add focused parser / resolver tests and document unsupported PostgreSQL DDL clearly.
If you want to take it, please open a scoped PR against `dev` and link it here, or comment with the exact first-phase scope you plan to implement. That will make it easier for reviewers to keep this aligned with the existing MySQL / Oracle CDC schema-evolution model.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org