Gloria Usanase
10/08/2025, 5:48 AMorg.postgresql.util.PSQLException: An I/O error occurred while sending to the backend (EOF) from the CTID/Xmin iterator.
What’s already tried: Verified CH side (Atomic DB, correct namespace, no cluster, JSON disabled), limited concurrency to 1, ran Full refresh | Overwrite for big tables, and adjusted the Postgres source (JDBC `socketTimeout=0&tcpKeepAlive=true&defaultRowFetchSize=1000`; role GUCs removing statement/idle timeouts). Inserts into CH occur in 2k batches, but overall throughput is far slower than v1 and several large streams still don’t finish. Looking for any known v2.1.x performance regressions or tuning tips for PG→CH initial loads (batch/window sizes, fetch size, CTID vs Xmin, CDC for big tables, etc.).kapa.ai
10/08/2025, 5:49 AMdefaultRowFetchSize=1000 for the Postgres JDBC source, which is reasonable. You might experiment with higher values if your source and network can handle it. - CTID vs Xmin vs CDC: For very large tables, Airbyte recommends using CDC for lowest latency and reliability, especially if you encounter issues with CTID or Xmin (e.g., wraparound, snapshot failures) [Low-Latency Data Availability Stack](https://airbyte.com/tutorials/low-latency-data-availability-stack). If your tables are >500GB or you see snapshot iterator errors, switching to CDC may help. - Postgres Source Errors: The org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend (EOF) from the CTID/Xmin iterator suggests a network or resource exhaustion issue during large snapshot reads. This could be exacerbated by the new destination's slower ingestion, causing the source to time out or drop connections. Ensuring no idle/statement timeouts and increasing socket timeouts (as you've done) are good steps. - Checkpointing: Airbyte's checkpointing is designed to help with large syncs, but if the destination is slow, the source may not checkpoint frequently enough, leading to repeated work and further slowdowns [Low-Latency Data Availability Stack](https://airbyte.com/tutorials/low-latency-data-availability-stack). ### Limitations - No Explicit v2.1.x Regression Documentation: The knowledge sources do not explicitly mention a known performance regression in ClickHouse v2.1.x, nor do they provide detailed tuning parameters for this specific scenario. - No Direct Guidance on Window Size: There is no documentation on tuning "window size" for the ClickHouse destination, though batch size is configurable. ### Recommendations 1. Adjust Batch Size: Increase the batch size for ClickHouse inserts (see v2.0.10+ feature). 2. Experiment with Source Fetch Size: Try increasing defaultRowFetchSize if possible. 3. Consider CDC for Large Tables: If CTID/Xmin iterators are unreliable for your largest tables, try switching to CDC mode for those tables. 4. Monitor Resource Usage: Ensure both Airbyte and ClickHouse have sufficient resources (CPU, memory, disk I/O). 5. Check for Updates: Stay up to date with the latest connector versions, as recent releases (2.1.4) mention "speed mode" and other performance improvements. 6. Report Issues: If the problem persists, consider opening a GitHub issue with detailed logs and configuration, as the Airbyte team is actively developing and maintaining the ClickHouse v2 connector. I'm sorry, but the knowledge sources do not contain a definitive answer about a specific v2.1.x performance regression for ClickHouse. However, the above steps are supported by the available documentation and user reports, and may help you further diagnose or mitigate the issue. If you need more detailed tuning advice, you may want to join the Airbyte Slack or follow the ongoing discussions for ClickHouse v2 feedback [Destination ClickHouse V2- Ready for Beta Testers!](https://github.com/airbytehq/airbyte/discussions/62035).