<@U04S8PLJWMT> is it safe to run on internal airby...
# ask-ai
f
@kapa.ai is it safe to run on internal airbyte postgres
DELETE FROM "attempt" WHERE "ended_at" < NOW() - INTERVAL '180 days';
?
k
Based on the available knowledge sources, there is no official documentation or guidance from Airbyte that explicitly states it is safe to manually delete rows from the internal Airbyte Postgres attempts table using a query like:
Copy code
sql DELETE FROM "attempt" WHERE "ended_at" < NOW() - INTERVAL '180 days';
There are community discussions and feature requests about purging old syncs and cleaning up large jobs and attempts tables, and it is acknowledged that there is currently no built-in cleanup routine for these tables in Airbyte. One maintainer specifically mentioned: > I couldn't find any clean routines for attempts and jobs in the platform code, which could be a useful feature to prevent full disk issues. > Reference: [Documentation Page](https://docs.airbyte.com/operator-guides/configuring-airbyte#data-retention) [Purging of old syncs from Airbyte databases](https://github.com/airbytehq/airbyte/discussions/55233) This suggests that while manual deletion is technically possible, it is not officially documented or supported, and there may be unknown side effects. The jobs and attempts tables are linked (attempts reference jobs via a foreign key), and deleting attempts without considering related jobs or other dependencies could potentially cause issues with Airbyte's internal state or UI. Summary: There is no official confirmation that running such a DELETE statement is safe. Proceed with caution, and consider backing up your database before making manual changes. If possible, wait for or request an officially supported cleanup feature from Airbyte. For reference, the only officially supported retention configuration is for Temporal history (not for Airbyte's own jobs/attempts tables) via the
TEMPORAL_HISTORY_RETENTION_IN_DAYS
environment variable, which does not affect the Airbyte Postgres tables in question [Configuring Airbyte: Data Retention](https://docs.airbyte.com/platform/operator-guides/configuring-airbyte#data-retention).
f
@kapa.ai what about not deleting records but updating attempt_sync_config to null to those rows older than 1 week?
k
A message from kapa.ai
I'm sorry, but the knowledge sources do not contain explicit information about the safety or side effects of updating the attempt_sync_config column to null for rows in the attempts table that are older than one week. There is no documentation or community discussion addressing this specific operation. While the schema for the attempts table is described, including the attempt_sync_config column, there is no guidance on whether this field is used for historical auditing, troubleshooting, or if nulling it out could impact Airbyte's functionality or UI for past jobs [Airbyte Databases Data Catalog](https://docs.airbyte.com/platform/1.7/understanding-airbyte/database-data-catalog#jobs-database). Therefore, I cannot confirm if this operation is safe. If you decide to proceed, it is strongly recommended to back up your database first and test the change in a non-production environment.
f
@kapa.ai could be possible that this is a kubernetes problem?
k
A message from kapa.ai
Based on the knowledge sources provided, it is possible that some issues with Airbyte—such as sync failures, stuck pods, or resource exhaustion—can be related to Kubernetes configuration or environment problems. Several users have reported issues that were ultimately traced back to Kubernetes resource limits, pod cleanup, persistent volumes, or networking between pods and databases. For example: - Problems with pods stuck in "Terminating" or not being cleaned up were linked to Kubernetes pod sweeper configuration and resource management, not Airbyte itself. Adjusting the pod sweeper frequency helped resolve the issue, but there is no built-in Kubernetes job history limit for Airbyte jobs, so custom cleanup may be needed ([Forum: Destination, orchestrator, and source pod all stuck in terminating](https://discuss.airbyte.io/t/2545)). - Sync failures, missing logs, or jobs hanging have sometimes been traced to Kubernetes resource allocation (CPU/memory), node group configuration, or persistent volume issues. Upgrading Airbyte, increasing resources, or changing deployment methods (Helm vs. Kustomize) have resolved some of these issues ([Forum: Getting 504 Gateway-time out error for Airbyte connection](https://discuss.airbyte.io/t/376), [Forum: Large sync fails but successfully loads data after failed retry](https://discuss.airbyte.io/t/782)). - Issues with database connectivity (e.g., Temporal context deadline exceeded) were sometimes due to network latency between the Kubernetes cluster and the database, which was resolved by deploying the database in the same region as the cluster ([Github: Airbyte Temporal context deadline exceeded on eks](https://github.com/airbytehq/airbyte/issues/59730)). Summary: Yes, it is possible that some Airbyte issues are caused or exacerbated by Kubernetes configuration or environment problems. If you are experiencing unexplained failures or resource issues, reviewing your Kubernetes setup—including resource limits, pod cleanup, networking, and persistent storage—is recommended. However, for specific database operations (like modifying the attempts table), there is no direct evidence in the knowledge sources that Kubernetes would be the root cause. If your issue is related to Airbyte's internal database size or cleanup, it is more likely a platform or application-level concern rather than a Kubernetes problem.