stanley
07/09/2025, 4:08 PMkapa.ai
07/09/2025, 4:09 PMdocker-compose.yml file. You can check your running container for the precise version. - Replacement: You can configure Airbyte to use an external PostgreSQL database instead of the default internal one. However, only PostgreSQL is supported—other databases like MySQL or MS SQL are not supported for this purpose. You must manually migrate your data if you switch to an external database, as Airbyte does not provide an automatic migration tool between internal and external databases at this time [Is it possible to use MySQL or other database as the Airbyte Internal Database?](https://discuss.airbyte.io/t/1505), [Connect Airbyte to External MS SQL database](https://discuss.airbyte.io/t/2229), [Connecting to an External Postgres database](https://discuss.airbyte.io/t/2903). ### 2. Temporal Database (airbyte-temporal) - Type: PostgreSQL - Purpose: Used by Temporal, the workflow engine that orchestrates Airbyte jobs. Temporal requires two databases: temporal and temporal_visibility. - Default Version: Also uses PostgreSQL, typically the same version as the main Airbyte database, but you can configure this in your deployment. - Replacement: You can point Temporal to an external PostgreSQL database as well, but again, only PostgreSQL is supported. Configuration is done via environment variables or Helm values if using Kubernetes [Helm Chart: make temporal and temporal_visibility databases configurable](https://github.com/airbytehq/airbyte/issues/11157). ### 3. Other Databases - No MongoDB: There is no MongoDB used in the core Airbyte platform for internal state, metadata, or orchestration in the 0.63.2 Docker Compose deployment. MongoDB may be used as a source or destination connector, but not as an internal database. - Cannot Replace with MongoDB: You cannot replace the internal PostgreSQL databases with MongoDB or any other database type. Airbyte relies on PostgreSQL-specific features for its internal operations [Is it possible to use MySQL or other database as the Airbyte Internal Database?](https://discuss.airbyte.io/t/1505). ### Summary Table | Database | Default Type | Used For | Can Replace? | Supported External Types | |-------------------------|--------------|----------------------------------|----------------------|-------------------------| | airbyte-db | PostgreSQL | Internal state, config, jobs | Yes, with PostgreSQL | PostgreSQL only | | temporal, temporal_visibility | PostgreSQL | Workflow orchestration (Temporal) | Yes, with PostgreSQL | PostgreSQL only | | MongoDB | N/A | Not used internally | N/A | N/A | In summary: Airbyte 0.63.2 Docker Compose uses PostgreSQL for all internal databases (airbyte-db, temporal, temporal_visibility). MongoDB is not used for internal purposes and cannot be used as a replacement for these databases. Only external PostgreSQL is supported for replacing the default internal databases, and you must handle data migration manually if you switch [Is it possible to use MySQL or other database as the Airbyte Internal Database?](https://discuss.airbyte.io/t/1505), [Connecting to an External Postgres database](https://discuss.airbyte.io/t/2903), [Connect Airbyte to External MS SQL database](https://discuss.airbyte.io/t/2229).stanley
07/09/2025, 4:11 PMkapa.ai
07/09/2025, 4:11 PMkapa.ai
07/09/2025, 4:11 PMtemporal_visibility is a PostgreSQL database used by Temporal, the workflow engine that orchestrates Airbyte jobs. It is not MongoDB. In Airbyte deployments, especially with Docker Compose or Helm, you will see references to both temporal and temporal_visibility databases. These are required for Temporal's operation and are always PostgreSQL databases in the context of Airbyte. If you are using an external database, you must manually create both temporal and temporal_visibility as PostgreSQL databases and grant the necessary permissions to the Airbyte user. There is no support for using MongoDB for these databases in Airbyte; MongoDB is not used for internal orchestration or metadata storage in Airbyte deployments [Forum: "Unable to create SQL database." when trying to connect to an external database](https://discuss.airbyte.io/t/1544), [Helm Chart: make temporal and temporal_visibility databases configurable](https://github.com/airbytehq/airbyte/issues/11157).stanley
07/09/2025, 4:21 PMkapa.ai
07/09/2025, 4:21 PMkapa.ai
07/09/2025, 4:21 PMtemporal_visibility by replacing your current deployment with your internal PostgreSQL database instance, follow these steps: --- ### 1. Prepare Your Internal PostgreSQL Instance - Ensure your internal PostgreSQL instance is running and accessible from your Airbyte deployment. - Create the required databases for Airbyte and Temporal: sql CREATE DATABASE airbyte WITH OWNER = <your_airbyte_user>; CREATE DATABASE temporal WITH OWNER = <your_airbyte_user>; CREATE DATABASE temporal_visibility WITH OWNER = <your_airbyte_user>; Replace <your_airbyte_user> with the user Airbyte will use to connect. --- ### 2. Set Up Database Credentials as Kubernetes Secrets (if using Helm/K8s) Create a Kubernetes secret (e.g., airbyte-config-secrets) containing your database credentials: yaml apiVersion: v1 kind: Secret metadata: name: airbyte-config-secrets type: Opaque stringData: database-user: <your_airbyte_user> database-password: <your_password> Replace <your_airbyte_user> and <your_password> accordingly. --- ### 3. Configure Airbyte to Use the External Database Update your values.yaml file to disable the internal Postgres and point to your internal instance: yaml postgresql: enabled: false global: database: type: external secretName: "airbyte-config-secrets" host: "<your_postgres_host>" port: "<your_postgres_port>" database: "airbyte" userSecretKey: "database-user" passwordSecretKey: "database-password" Replace <your_postgres_host> and <your_postgres_port> with your internal Postgres details. --- ### 4. Grant Permissions Ensure the Airbyte user has all privileges on the databases: sql GRANT ALL PRIVILEGES ON DATABASE airbyte TO <your_airbyte_user>; GRANT ALL PRIVILEGES ON DATABASE temporal TO <your_airbyte_user>; GRANT ALL PRIVILEGES ON DATABASE temporal_visibility TO <your_airbyte_user>; --- ### 5. Deploy Airbyte with the New Configuration - If using Helm, deploy or upgrade Airbyte with the updated values.yaml and secret. - If using Docker Compose, update your environment variables or configuration files to point to the new Postgres instance. --- ### 6. Troubleshooting - If you encounter timeouts during deployment, increase the Helm install timeout, e.g.: bash helm install release-1 airbyte/airbyte -f values.yaml --timeout 10m0s - Make sure the databases exist before deploying, as Airbyte expects them to be present and will not create them automatically in external setups. --- Note: - temporal_visibility is a PostgreSQL database, not MongoDB. - Airbyte does not support using MongoDB for internal databases. - You must manually migrate any existing data if you are moving from a previous database instance. References: [Helm Chart Postgres Version Support and Setup Example](https://github.com/airbytehq/airbyte/issues/48542) [Official Documentation: External Database Setup](https://docs.airbyte.com/platform/1.6/deploying-airbyte/integrations/database) [Forum: Manual Database Creation and Permissions](https://discuss.airbyte.io/t/1544)stanley
07/09/2025, 4:23 PMkapa.ai
07/09/2025, 4:23 PMkapa.ai
07/09/2025, 4:24 PMairbyte, temporal, and temporal_visibility. Example SQL: sql CREATE DATABASE airbyte WITH OWNER = <your_airbyte_user>; CREATE DATABASE temporal WITH OWNER = <your_airbyte_user>; CREATE DATABASE temporal_visibility WITH OWNER = <your_airbyte_user>; - Grant privileges: Make sure the Airbyte user has all privileges on these databases: sql GRANT ALL PRIVILEGES ON DATABASE airbyte TO <your_airbyte_user>; GRANT ALL PRIVILEGES ON DATABASE temporal TO <your_airbyte_user>; GRANT ALL PRIVILEGES ON DATABASE temporal_visibility TO <your_airbyte_user>; [Forum: "Unable to create SQL database." when trying to connect to an external database](https://discuss.airbyte.io/t/1544) --- ### 2. Update Your Docker Compose Configuration - Edit your docker-compose.yaml file to point the Airbyte services to your internal PostgreSQL instance instead of the default airbyte-db container. - Update the environment variables for the following services: - airbyte-server - airbyte-worker - airbyte-temporal - Any other service that connects to the database The key environment variables to update are typically: - DATABASE_HOST - DATABASE_PORT - DATABASE_USER - DATABASE_PASSWORD - DATABASE_DB (for Airbyte) - For Temporal: DB, DBNAME, VISIBILITY_DBNAME, POSTGRES_USER, POSTGRES_PWD, etc. Note: The exact variable names may vary depending on your Airbyte version and compose file. You can refer to your current docker-compose.yaml for the correct variable names. --- ### 3. Migrate Existing Data (if needed) - If you have existing data in your current Airbyte deployment, you must manually backup and restore the data from the old Postgres container to your new internal instance. Example steps: 1. Stop all Airbyte services except the database: docker-compose down docker-compose up -d db 2. Dump the database: docker exec airbyte-db pg_dump -U <old_user> airbyte > airbyte_backup.sql docker exec airbyte-db pg_dump -U <old_user> temporal > temporal_backup.sql docker exec airbyte-db pg_dump -U <old_user> temporal_visibility > temporal_visibility_backup.sql 3. Restore these dumps into your new internal Postgres instance: psql -h <new_host> -U <new_user> -d airbyte -f airbyte_backup.sql psql -h <new_host> -U <new_user> -d temporal -f temporal_backup.sql psql -h <new_host> -U <new_user> -d temporal_visibility -f temporal_visibility_backup.sql [How to import/export Airbyte to a new instance (docker to docker deploy)](https://discuss.airbyte.io/t/3514), [External Postgres Database Setup Issues](https://github.com/airbytehq/airbyte/issues/49304) --- ### 4. Restart Airbyte with the New Configuration - Bring up your Airbyte deployment with the updated `docker-compose.yaml`: docker-compose up -d --- ### 5. Verify the Setup - Check the logs of Airbyte services to ensure they are connecting to your internal PostgreSQL instance and not the default container. - Make sure there are no errors related to database connections or schema setup. --- Important Notes: - temporal_visibility is a PostgreSQL database, not MongoDB, and MongoDB cannot be used as a replacement for any internal Airbyte database. - Airbyte open-source Docker Compose deployments only support PostgreSQL for internal databases. - All database migration and configuration steps must be performed manually; there is no built-in migration tool for this scenario in the open-source version. If you need more details on the environment variables or run into specific errors, please provide your docker-compose.yaml or error logs for more targeted help.stanley
07/09/2025, 4:31 PMkapa.ai
07/09/2025, 4:31 PMkapa.ai
07/09/2025, 4:31 PMairbyte-db and Temporal databases (temporal, temporal_visibility) from the default Docker Compose-managed Postgres to your own internally managed Postgres instance, based strictly on the available knowledge sources: --- ## 1. Prepare Your Internal Postgres Instance - Create the required databases on your internal Postgres: sql CREATE DATABASE airbyte WITH OWNER = <your_airbyte_user>; CREATE DATABASE temporal WITH OWNER = <your_airbyte_user>; CREATE DATABASE temporal_visibility WITH OWNER = <your_airbyte_user>; Replace <your_airbyte_user> with the user Airbyte will use to connect. - Grant privileges: sql GRANT ALL PRIVILEGES ON DATABASE airbyte TO <your_airbyte_user>; GRANT ALL PRIVILEGES ON DATABASE temporal TO <your_airbyte_user>; GRANT ALL PRIVILEGES ON DATABASE temporal_visibility TO <your_airbyte_user>; [Forum: Connecting to an External Postgres database](https://discuss.airbyte.io/t/2903), [External Postgres Database Setup Issues](https://github.com/airbytehq/airbyte/issues/49304) --- ## 2. Backup Existing Data - Stop Airbyte services except the database: docker-compose down docker-compose up -d db - Dump the databases from your current Docker-managed Postgres: bash docker exec airbyte-db pg_dump -U <old_user> airbyte > airbyte_backup.sql docker exec airbyte-db pg_dump -U <old_user> temporal > temporal_backup.sql docker exec airbyte-db pg_dump -U <old_user> temporal_visibility > temporal_visibility_backup.sql Replace <old_user> with the user configured in your current deployment. --- ## 3. Restore Data to Internal Postgres - Restore the dumps into your new internal Postgres instance: bash psql -h <new_host> -U <your_airbyte_user> -d airbyte -f airbyte_backup.sql psql -h <new_host> -U <your_airbyte_user> -d temporal -f temporal_backup.sql psql -h <new_host> -U <your_airbyte_user> -d temporal_visibility -f temporal_visibility_backup.sql [How to import/export Airbyte to a new instance (docker to docker deploy)](https://discuss.airbyte.io/t/3514), [External Postgres Database Setup Issues](https://github.com/airbytehq/airbyte/issues/49304) --- ## 4. Update Docker Compose Configuration - Edit your docker-compose.yaml to point all Airbyte services to your internal Postgres instance instead of the default airbyte-db container. - Update environment variables for each service (such as airbyte-server, airbyte-worker, airbyte-temporal) to use your internal Postgres host, port, user, and password. The exact variable names may vary, but typically include: - DATABASE_HOST - DATABASE_PORT - DATABASE_USER - DATABASE_PASSWORD - DATABASE_DB (for Airbyte) - For Temporal: DBNAME, VISIBILITY_DBNAME, POSTGRES_USER, POSTGRES_PWD, etc. Note: The knowledge sources do not provide a full list of environment variables for Docker Compose, so you should refer to your current docker-compose.yaml for the correct variable names. --- ## 5. Restart Airbyte - Bring up Airbyte with the updated configuration: docker-compose up -d --- ## 6. Verify the Migration - Check logs for all Airbyte services to ensure they are connecting to your internal Postgres instance and not the default container. - Ensure there are no errors related to database connections or schema setup. --- Important Notes: - temporal_visibility is a PostgreSQL database, not MongoDB, and MongoDB cannot be used as a replacement for any internal Airbyte database. - All migration and configuration steps must be performed manually; there is no built-in migration tool for this scenario in the open-source version. - The knowledge sources do not provide a step-by-step for every possible environment variable, so you may need to consult your current configuration for exact details. If you encounter specific errors or need help with your docker-compose.yaml, please provide more details for targeted assistance.stanley
07/09/2025, 4:39 PMkapa.ai
07/09/2025, 4:39 PMkapa.ai
07/09/2025, 4:39 PMairbyte, temporal, and temporal_visibility). The Airbyte documentation and community discussions consistently show that these databases can coexist on a single PostgreSQL instance, and this is a common setup for both Docker Compose and Kubernetes deployments. There is no requirement to run each database on a separate PostgreSQL instance [External Postgres Database Setup Issues](https://github.com/airbytehq/airbyte/issues/49304). If you have a PostgreSQL cluster (for example, with 3-4 nodes for high availability) and a load balancer in front of it, you can use the load balancer's endpoint as the host in your Airbyte configuration. This is a standard approach for production deployments to ensure reliability and failover. Just make sure that the load balancer is configured to handle PostgreSQL traffic correctly and that all Airbyte services can connect to the databases through it. In summary: - You can (and typically should) use a single PostgreSQL instance or cluster for all three databases. - Just create the three databases (airbyte, temporal, temporal_visibility) on that instance/cluster. - Use the load balancer's address as the database host in your Docker Compose configuration. The knowledge sources do not mention any restrictions or special requirements for using a PostgreSQL cluster or load balancer, so this architecture is supported as long as the databases are accessible and the user has the necessary privileges [External Postgres Database Setup Issues](https://github.com/airbytehq/airbyte/issues/49304).kapa.ai
07/09/2025, 4:57 PMkapa.ai
07/09/2025, 4:57 PMstanley
07/09/2025, 7:27 PMkapa.ai
07/09/2025, 7:27 PMkapa.ai
07/09/2025, 7:27 PM<your_airbyte_user> refers to the PostgreSQL database user that Airbyte services will use to connect to your Postgres instance. It is not the same as the Airbyte UI username. The database user is specified in your Airbyte configuration (such as environment variables or secrets) and must have the necessary privileges on the Airbyte, Temporal, and Temporal Visibility databases. For example, you might create the user in Postgres like this: sql CREATE USER airbyte PASSWORD 'your_password'; Then, you would use this user as the owner when creating the databases: sql CREATE DATABASE airbyte WITH OWNER = airbyte; CREATE DATABASE temporal WITH OWNER = airbyte; CREATE DATABASE temporal_visibility WITH OWNER = airbyte; This user is referenced in your Airbyte deployment configuration as the database user, not as an application/UI user [Forum: "Unable to create SQL database." when trying to connect to an external database](https://discuss.airbyte.io/t/1544), [External Postgres Database Setup Issues](https://github.com/airbytehq/airbyte/issues/49304).stanley
07/09/2025, 7:44 PMkapa.ai
07/09/2025, 7:44 PMkapa.ai
07/09/2025, 7:45 PMairbyte_appcode0. The specific username does not matter, as long as: - The user exists in your PostgreSQL instance. - The user has the necessary privileges (such as ownership or all privileges) on the airbyte, temporal, and temporal_visibility databases. You do not need to use a user named airbyte specifically. Just ensure that the user you choose is granted the required permissions, as shown in the example: sql CREATE DATABASE airbyte WITH OWNER = airbyte_appcode0; CREATE DATABASE temporal WITH OWNER = airbyte_appcode0; CREATE DATABASE temporal_visibility WITH OWNER = airbyte_appcode0; GRANT ALL PRIVILEGES ON DATABASE airbyte TO airbyte_appcode0; GRANT ALL PRIVILEGES ON DATABASE temporal TO airbyte_appcode0; GRANT ALL PRIVILEGES ON DATABASE temporal_visibility TO airbyte_appcode0; This is supported and commonly done, as the knowledge sources show that the important part is the privileges, not the specific username [Forum: "Unable to create SQL database." when trying to connect to an external database](https://discuss.airbyte.io/t/1544), [External Postgres Database Setup Issues](https://github.com/airbytehq/airbyte/issues/49304).stanley
07/09/2025, 8:18 PMkapa.ai
07/09/2025, 8:18 PMkapa.ai
07/09/2025, 8:18 PMairbyte_user) ownership or ALL PRIVILEGES on the relevant databases (airbyte, temporal, temporal_visibility) [Forum: "Unable to create SQL database." when trying to connect to an external database](https://discuss.airbyte.io/t/1544), [External Postgres Database Setup Issues](https://github.com/airbytehq/airbyte/issues/49304). However, your enterprise policy requires that all databases are owned by the default postgres user, and application users cannot be owners or have ALL PRIVILEGES. The knowledge sources do not provide an officially documented or supported alternative for this scenario. There is no explicit guidance on running Airbyte with a restricted-privilege user who is not the database owner and does not have ALL PRIVILEGES. Possible considerations based on the sources: - Airbyte needs to be able to create and drop tables, and sometimes schemas, in its databases. If you can grant the application user the minimum required privileges (such as CREATE, USAGE on schemas, and INSERT, UPDATE, DELETE, SELECT on tables), it may work, but this is not guaranteed or documented as supported in the knowledge sources. - For Temporal, the setup process may require additional privileges for schema setup, and the sources indicate that lack of sufficient privileges can cause startup failures [Forum: Kubernetes: temporal: Cannot start with empty DBs already created](https://discuss.airbyte.io/t/4432). Summary: The knowledge sources do not explicitly document a supported way to run Airbyte with a non-owner, restricted-privilege user in compliance with strict TSS/IAM standards. If you cannot grant ownership or ALL PRIVILEGES, you may encounter issues, and there is no official workaround provided in the sources. Proceed with caution and test thoroughly if you attempt to use a more restricted privilege set. If you need a fully supported solution for this scenario, you may need to reach out to Airbyte support or open a feature request for more granular privilege requirements.stanley
07/11/2025, 2:53 PMkapa.ai
07/11/2025, 2:53 PMkapa.ai
07/11/2025, 2:53 PMstanley
07/11/2025, 2:59 PMPRIMARY KEY constraint and, when the source column is AUTO_INCREMENT, it emits GENERATED BY DEFAULT AS IDENTITY so inserts on the Postgres side keep working"kapa.ai
07/11/2025, 2:59 PMkapa.ai
07/11/2025, 2:59 PMPRIMARY KEY constraints or convert MySQL AUTO_INCREMENT columns to PostgreSQL GENERATED BY DEFAULT AS IDENTITY columns during migration. The official documentation for Destinations V2 highlights: - One-to-one table mapping (no more sub-tables) - Improved error handling - Incremental delivery for large syncs - Internal Airbyte tables in the airbyte_internal schema - Removal of SCD tables and sub-tables for nested properties - For Postgres, preserving mixed case column names in final tables But it does not mention automatic creation of primary keys or identity columns based on source schema, nor does it mention schema-level features like constraints or auto-increment conversions being handled automatically during migration [Upgrading to Destinations V2](https://docs.airbyte.com/release_notes/upgrading_to_destinations_v2), [Postgres Migration Guide](https://docs.airbyte.com/integrations/destinations/postgres-migrations#postgres-migration-guide). Therefore, based on the knowledge sources provided, there is no confirmation that Airbyte V2 connectors for Postgres will automatically create PRIMARY KEY constraints or convert AUTO_INCREMENT columns to identity columns. Manual intervention may still be required for these schema features. If you need this functionality, you should review the latest connector changelogs or test the behavior in your environment, as the documentation does not guarantee it.