naivedogger opened a new pull request, #4513: URL: https://github.com/apache/flink-cdc/pull/4513
## What is the purpose of this pull request? Fixes [FLINK-40453](https://issues.apache.org/jira/browse/FLINK-40453). `PostgresPipelineRecordEmitter` currently builds all `CreateTableEvent`s eagerly in its constructor (and again in the `applySplit()` override), which opens a JDBC connection and fetches every captured table's schema up front — before any split is processed. This adds startup overhead that scales with the number of captured tables. A table's schema is only needed when its first record / low-watermark / schema-change event is emitted, so loading everything at initialization is wasteful. ## Brief change log - Remove the eager `generateCreateTableEvent()` call from the constructor and drop the `applySplit()` override that pre-populates the cache. - Resolve and cache each `CreateTableEvent` lazily on demand, falling back to a JDBC lookup only when the split state does not already carry the table schema. - Behavior for snapshot / incremental / schema-change paths is unchanged. --- ## Verifying this change This change added tests and can be verified as follows: - Added unit tests in `PostgresPipelineRecordEmitterTest`, asserting that constructing the emitter opens no JDBC connection and that assigning a snapshot split does not trigger loading of all table schemas. ## Documentation - Does this pull request introduce a new feature? (no) - If yes, how is the feature documented? (not applicable) --- -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
