Sree Shanthan Kuthuru
07/25/2025, 2:36 PMkapa.ai
07/25/2025, 2:36 PMERROR: could not write to file "base/pgsql_tmp/pgsql_tmp5469.31": No space left on device indicates that your Postgres destination database has run out of disk space, specifically in the area used for temporary files during large operations. This is a common issue when syncing large volumes of data with Airbyte, especially to Postgres destinations. Key points and recommendations: - Root Cause: The error is coming from the Postgres database, not Airbyte itself. Postgres uses temporary files (often in the base/pgsql_tmp/ directory) for certain operations, and if the disk fills up, you will see this error. This can happen even if your main data tables are not full, as temp files can grow large during big syncs or complex queries [No space left on device during sync](https://discuss.airbyte.io/t/1572). - Check Disk Usage: Double-check the available disk space on your Postgres instance, especially the partition where Postgres stores its data and temp files. You can use SQL to check temp file usage: sql SELECT datname, temp_files AS "Temporary files", pg_size_pretty(temp_bytes) AS "Size of temporary files" FROM pg_stat_database WHERE datname = '<your_database_name>'; - Aurora/Postgres Specifics: If you are using Aurora or a managed Postgres service, disk space may be managed differently, but temp file usage can still cause issues. Review your cloud provider's documentation for managing storage and temp files [No space left on device during sync](https://discuss.airbyte.io/t/1572). - Airbyte Workspace: If your Airbyte WORKSPACE_ROOT is on a small partition, it can also fill up and cause similar issues. Make sure your Airbyte workspace is on a partition with sufficient space [Postgres to Snowflake only sync part of the data](https://discuss.airbyte.io/t/2188). - Postgres as a Destination: Postgres is not recommended for large data volumes (over 10GB) as a destination. For larger syncs, consider using a data warehouse like BigQuery, Snowflake, or Redshift [Postgres Troubleshooting](https://docs.airbyte.com/integrations/destinations/postgres/postgres-troubleshooting#connector-limitations). How to resolve: 1. Free up disk space on your Postgres server, especially in the temp file directory. 2. Increase disk allocation if possible. 3. Monitor temp file usage during large syncs. 4. Consider switching to a data warehouse if your data volume is large. If you are using a managed service (like AWS Aurora), consult their documentation for increasing storage or managing temp files. If you need more help, please provide details about your Postgres deployment (self-hosted, cloud provider, etc.).Sree Shanthan Kuthuru
07/25/2025, 2:51 PMkapa.ai
07/25/2025, 2:51 PMkapa.ai
07/25/2025, 2:52 PMsql SELECT datname, temp_files AS "Temporary files", pg_size_pretty(temp_bytes) AS "Size of temporary files" FROM pg_stat_database WHERE datname = '<your_database_name>'; If you see a large amount of space used by temporary files, this is likely the root cause of the error. 2. Review AWS Aurora Storage While Aurora manages storage automatically, temporary file usage can still cause issues. AWS provides documentation and suggestions for handling storage issues in Aurora. You should review the [AWS documentation on Aurora storage issues](https://aws.amazon.com/premiumsupport/knowledge-center/postgresql-aurora-storage-issue/) for guidance on monitoring and resolving these problems. 3. Consider Aurora-Specific Limitations - Aurora implements a CDC caching layer that is incompatible with Airbyte’s CDC. If you are using CDC, disable the CDC caching by setting the rds.logical_wal_cache parameter to 0 in the Aurora parameter group. - If you encounter timeout errors, set apg_write_forward.idle_session_timeout to 1200000 (20 minutes) in the parameter group. - If a failover occurs, you may need to manually re-create replication slots and reset the Airbyte connection [Postgres Source Troubleshooting](https://docs.airbyte.com/integrations/sources/postgres/postgres-troubleshooting#vendor-specific-connector-limitations). 4. Increase Aurora Cluster Size If your workload is large, consider increasing the size of your Aurora cluster to provide more resources for handling large syncs and temporary file usage. 5. General Advice If managing temp files and storage in Aurora becomes too complex, you might consider switching to a standard RDS instance, where you have more direct control over storage and temp file management [No space left on device during sync](https://discuss.airbyte.io/t/1572). Summary: - Monitor and manage temporary file usage in Aurora. - Adjust Aurora parameters as needed for Airbyte compatibility. - Increase cluster size if necessary. - Consult AWS documentation for Aurora-specific storage management. If these steps are too complex or do not resolve the issue, consider switching to a different Postgres deployment or a data warehouse destination.