1. <@U04S8PLJWMT> is there a way to modify the def...
# ask-ai
m
1. @kapa.ai is there a way to modify the default 10000 rows that airbyte batches up before unloading that chunk to the destination
k
Based on the available knowledge sources, Airbyte typically batches records in groups of 10,000 before unloading to the destination. This is mentioned in several places, such as the S3 and AWS Datalake destinations, where the batch size is hardcoded to 10,000 records. However, as of now, there is no documented way to configure or modify this batch size through the Airbyte UI or connector configuration for most destinations. Users have requested this feature, and there are open issues suggesting that making the batch size configurable would help avoid out-of-memory errors and improve flexibility, but it has not yet been implemented or officially documented as available for general use [Sync performance](https://discuss.airbyte.io/t/1578), [How memory request and limit works under the hood](https://discuss.airbyte.io/t/2214), [Destination process exited with non-zero exit code 137](https://github.com/airbytehq/airbyte/issues/39128), [Reads should batch on bytes read instead of records read](https://github.com/airbytehq/airbyte/issues/3439). If you are using a specific connector, it is worth checking its documentation or changelog, as some connectors (like Google Sheets) have recently added parameters to control batch size for reading, but this is not yet a general feature for all destinations or sources. In summary: There is currently no general way to modify the default 10,000-row batch size for unloading to destinations in Airbyte, though this is a known limitation and feature request.
m
@kapa.ai can you point me to where in the postgres connector this is managed
k
A message from kapa.ai
In the context of the Airbyte Postgres destination connector, the batching behavior—specifically, how many records are processed before unloading to the destination—is not explicitly documented in the provided knowledge sources. However, there are several relevant references: - The general batching mechanism in Airbyte destinations is discussed, with a default batch size of 10,000 records mentioned for destinations in general, but not specifically for Postgres. This is referenced in discussions about memory management and out-of-memory errors, where the batch size is cited as a potential cause for issues with large records, but there is no direct pointer to the exact location in the Postgres connector code or configuration where this is set or can be changed [How memory request and limit works under the hood](https://discuss.airbyte.io/t/2214), [Reads should batch on bytes read instead of records read](https://github.com/airbytehq/airbyte/issues/3439). - There is an open discussion and feature request suggesting that warehouse destinations (including Postgres) should buffer and process data in smaller, configurable batches, but this is not yet implemented. The current approach is to stage all data and then perform typing and deduplication (T&D) in a single large transaction, which can cause performance issues for large tables. The discussion proposes chunking this process, but again, this is not yet available in the connector [Destinations for relational databases should operate in smaller batches](https://github.com/airbytehq/airbyte/discussions/44375). - In a user report about performance issues with large Postgres loads, it was noted that the final insert step can be very slow or never finish, and a suggestion was made that chunked loading would help, but this is not currently how the connector operates [destination-postgres not finishing loading 30Gb from IBM-DB2](https://github.com/airbytehq/airbyte/issues/51580). Summary: The knowledge sources do not provide a direct reference to where in the Postgres connector the batch size is managed or how to modify it. The current implementation appears to process all staged data in one large transaction during the typing and deduplication step, rather than in configurable batches. There are ongoing discussions and feature requests to improve this, but no current setting or code location is documented in the provided sources.