Renu Fulmali
07/30/2025, 9:45 AMkapa.ai
07/30/2025, 9:45 AMdb-airbyte) is missing. Solution: You need to manually create the db-airbyte database in your PostgreSQL instance. This can be done by connecting to your running PostgreSQL pod and executing the following command: bash kubectl -n <your-namespace> exec -it <airbyte-db-pod> -- psql --user airbyte --dbname postgres --command='create database "db-airbyte"' Replace <your-namespace> and <airbyte-db-pod> with your actual Kubernetes namespace and pod name. This approach has resolved the same error for other users installing Airbyte via Helm, as documented in the knowledge sources. After creating the database, the Airbyte bootloader should be able to connect and complete the installation process successfully [Unable to install Airbyte locally - Unable to connect to the database](https://github.com/airbytehq/airbyte/issues/45456). If you are using an external Postgres instance, ensure that the database is created and accessible with the correct user and permissions before running the Airbyte Helm chart [External Postgres Database Setup Issues](https://github.com/airbytehq/airbyte/issues/49304). Summary: - The error is due to the missing db-airbyte database. - Manually create the database as shown above. - Re-run or continue your Airbyte installation. Let me know if you need the exact command for your environment!Renu Fulmali
07/30/2025, 9:47 AMRenu Fulmali
07/30/2025, 9:47 AMkapa.ai
07/30/2025, 9:47 AMkapa.ai
07/30/2025, 9:47 AMbash abctl local uninstall --persisted rm -rf ~/.airbyte/ abctl local install --values values.yaml This process removes the persisted data and reinitializes the environment, effectively starting from a clean state. However, this is done via Airbyte's tooling and not by manually deleting directories inside the PVC from within the pod or Kubernetes directly. There is no guidance in the sources about manually deleting files from a PVC, and doing so could lead to unexpected issues if not handled carefully by the application or its initialization scripts [Resetting the Airbyte developer environment](https://docs.airbyte.com/platform/1.6/contributing-to-airbyte/developing-locally#resetting-the-airbyte-developer-environment). In summary: There is no official documentation or community guidance in the provided sources that recommends manually deleting the directory from a PVC and reinitializing the pod for Airbyte. The supported approach is to use Airbyte's uninstall/reset commands to clear persistent data and reinstall. If you need to reset your environment, it is safer to follow the documented reset procedures rather than manually deleting files from the PVC.Renu Fulmali
07/30/2025, 9:59 AMkapa.ai
07/30/2025, 9:59 AMkapa.ai
07/30/2025, 9:59 AMtemporal and temporal_visibility do not exist: FATAL: database "temporal" does not exist FATAL: database "temporal_visibility" does not exist This is a common issue when deploying Airbyte with a fresh or manually-initialized Postgres instance. Airbyte expects the temporal and temporal_visibility databases to be present. If they are missing, Airbyte (or the Temporal component) will attempt to create them, but if the configured user does not have permission to create databases, or if the initialization scripts do not run as expected, you will see these errors. Solution: You need to manually create the temporal and temporal_visibility databases and grant the necessary privileges to the Airbyte user. This is confirmed by both official Airbyte support and multiple user reports: sql CREATE DATABASE temporal; GRANT ALL PRIVILEGES ON DATABASE temporal TO airbyte; CREATE DATABASE temporal_visibility; GRANT ALL PRIVILEGES ON DATABASE temporal_visibility TO airbyte; Run these commands as a superuser (e.g., postgres) in your PostgreSQL instance. After this, restart your Airbyte pods and the errors should be resolved. This approach is directly recommended in the official Airbyte forum and GitHub issues [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). Summary: - The error is because the temporal and temporal_visibility databases do not exist. - Manually create these databases and grant privileges to the Airbyte user. - Restart your Airbyte deployment. If you continue to see issues after creating the databases, please share the new logs for further troubleshooting.Renu Fulmali
07/30/2025, 10:07 AMkapa.ai
07/30/2025, 10:07 AMkapa.ai
07/30/2025, 10:08 AMvalues.yaml. 3. (Optional but recommended): Pre-create the temporal and temporal_visibility databases in your Postgres instance and grant the necessary privileges to the Airbyte user, as the Temporal auto-setup may require database creation permissions otherwise. Here is an example values.yaml configuration for setting up Temporal with an external Postgres database: yaml postgresql: enabled: false global: database: type: external secretName: "airbyte-config-secrets" # Name of the Kubernetes secret containing DB credentials host: "<your-postgres-host>" port: "5432" database: "airbyte" # Airbyte's main database userSecretKey: "database-user" passwordSecretKey: "database-password" temporal: extraEnv: - name: DBNAME value: "temporal" - name: VISIBILITY_DBNAME value: "temporal_visibility" - name: SKIP_DB_CREATE value: "true" # Set to true if you have pre-created the databases - name: SQL_TLS_ENABLED value: "true" # Enable if your DB requires TLS - name: POSTGRES_TLS_ENABLED value: "true" # Enable if your DB requires TLS - name: POSTGRES_TLS_DISABLE_HOST_VERIFICATION value: "true" # Use with caution; disables host verification Notes: - The temporal.extraEnv section allows you to specify the database names and skip DB creation if you have already created them manually. This is useful in environments where the DB user does not have permission to create databases. - Make sure your Kubernetes secret (airbyte-config-secrets) contains the correct user and password for your Postgres instance. - If you are using TLS, set the appropriate environment variables as shown above. This configuration is based on community best practices and examples from Airbyte's documentation and GitHub issues [Configuring the Airbyte Database](https://docs.airbyte.com/platform/next/enterprise-setup/implementation-guide#configuring-the-airbyte-database), [Helm Chart: make temporal and temporal_visibility databases configurable](https://github.com/airbytehq/airbyte/issues/11157), and [Temporal v1.23.0 fails to start with error: Unable to create SQL database, but v1.20.1 works fine.](https://github.com/airbytehq/airbyte/issues/38593). If you need to use custom database names for Temporal, adjust the DBNAME and VISIBILITY_DBNAME values accordingly.Renu Fulmali
07/30/2025, 10:11 AMkapa.ai
07/30/2025, 10:11 AMkapa.ai
07/30/2025, 10:11 AMyaml postgresql: enabled: true global: database: type: internal With this configuration, Airbyte will deploy and use the internal PostgreSQL database that comes with the Helm chart. You do not need to provide external database connection details or secrets. The internal database will be automatically initialized and managed by Airbyte. This approach is confirmed in the official documentation, which states that enabling the internal Postgres is the default and recommended for non-production or simple deployments [Configuring the Airbyte Database](https://docs.airbyte.com/platform/1.6/enterprise-setup/implementation-guide#configuring-the-airbyte-database). If you encounter issues with the internal database (such as leftover data or initialization problems), you may need to delete the associated PersistentVolumeClaim (PVC) to reset the database state, but this is not covered in detail in the provided knowledge sources. Summary: - Set postgresql.enabled: true and global.database.type: internal in your Helm values. - No need to configure external database secrets or connection info.Renu Fulmali
07/30/2025, 10:15 AMkapa.ai
07/30/2025, 10:15 AMkapa.ai
07/30/2025, 10:15 AMpostgresql.enabled: true and global.database.type: internal) but Airbyte is still asking for the creation of the temporal and temporal_visibility databases, this suggests that something is not working as expected with the internal Postgres initialization. Based on the knowledge sources, this issue can occur if: - The internal Postgres data directory (PVC) was not properly initialized or was left in a partial state from a previous failed deployment. - There is a mismatch or misconfiguration in the Helm values, or the pods are not picking up the correct configuration. Troubleshooting steps from the knowledge sources: 1. Check for leftover data: If the PVC for the internal Postgres already contains data from a previous deployment, the initialization scripts may be skipped, and the required databases (temporal, temporal_visibility) may not be created. This is indicated by logs such as: PostgreSQL Database directory appears to contain a database; Skipping initialization In this case, you may need to delete the PVC associated with the internal Postgres to force a fresh initialization. However, the knowledge sources do not provide explicit instructions for this, so proceed with caution and ensure you do not need any existing data. 2. Manual database creation: If the databases are missing, you can manually create them by connecting to the internal Postgres pod and running: sql CREATE DATABASE temporal; CREATE DATABASE temporal_visibility; This is a workaround mentioned in several sources for both internal and external setups when the databases are missing and the application cannot create them automatically due to permissions or initialization issues [Forum: "Unable to create SQL database." when trying to connect to an external database](https://discuss.airbyte.io/t/1544). 3. Check Helm values: Ensure your values.yaml does not have conflicting settings (e.g., both internal and external database settings enabled). 4. Pod logs: Review the logs for the Postgres and Airbyte pods for any errors related to database initialization or permissions. Summary: - This issue is often caused by a partially-initialized or leftover Postgres data directory. - Deleting the PVC (if you do not need the data) and redeploying can resolve it. - Alternatively, manually create the missing databases inside the Postgres pod. If you continue to have issues, please provide the relevant pod logs and your current values.yaml configuration for further troubleshooting. The knowledge sources do not provide a more specific solution for this scenario.Renu Fulmali
07/30/2025, 10:19 AMkapa.ai
07/30/2025, 10:19 AMkapa.ai
07/30/2025, 10:19 AMtemporal and temporal_visibility databases from inside the database pod, you can use the psql command-line tool. Here’s how you can do it, based on the knowledge sources: 1. Access the Postgres pod (replace <your-namespace> and <postgres-pod-name> with your actual values): bash kubectl -n <your-namespace> exec -it <postgres-pod-name> -- bash 2. Connect to the Postgres server as the postgres user (or the user with sufficient privileges): bash psql -U postgres 3. Create the required databases and grant privileges (replace airbyte with your Airbyte DB user if different): sql CREATE DATABASE temporal; GRANT ALL PRIVILEGES ON DATABASE temporal TO airbyte; CREATE DATABASE temporal_visibility; GRANT ALL PRIVILEGES ON DATABASE temporal_visibility TO airbyte; This process is confirmed as the solution in the official Airbyte forum and GitHub issues for both internal and external Postgres setups [Forum: "Unable to create SQL database." when trying to connect to an external database](https://discuss.airbyte.io/t/1544). If you encounter a permissions error, ensure you are connecting as a user with the necessary rights to create databases. After running these commands, you can exit psql and the pod, then restart your Airbyte pods if needed.Renu Fulmali
07/30/2025, 10:20 AMkapa.ai
07/30/2025, 10:20 AMkapa.ai
07/30/2025, 10:20 AMpsql: error: FATAL: role "postgres" does not exist means that the postgres user (role) does not exist in your database instance. This can happen if the internal Airbyte Postgres was initialized with a different default user, or if the Helm chart or Docker image used a custom user. What to do: 1. Check the available users: You can try connecting as the airbyte user, which is commonly used by Airbyte's internal Postgres setup. For example: bash psql -U airbyte 2. If you don't know the user: - Check your Helm values.yaml for the configured Postgres user. - You can also look at the environment variables or secrets used by the Postgres pod for the username. 3. If you still can't connect: - You may need to check the pod logs or the initialization scripts to see which user was created. - If the database was initialized without a postgres superuser, you must use the user that was actually created during initialization. Summary: Try connecting with psql -U airbyte instead of psql -U postgres. If that doesn't work, check your configuration for the correct username. The knowledge sources confirm that the default user is often airbyte in Airbyte's internal Postgres deployments, not always postgres [Tutorial: Build an EL(T) from Postgres CDC (Change Data Capture)](https://airbyte.com/tutorials/postgresql-change-data-capture-elt#step-2). If you still have trouble, please provide the output of psql --help or the list of users if you can connect with any user.Renu Fulmali
07/30/2025, 10:21 AMkapa.ai
07/30/2025, 10:21 AMkapa.ai
07/30/2025, 10:21 AMairbyte database is also not present in your internal Postgres instance, this indicates that the database initialization did not complete as expected. This situation is documented in the knowledge sources: when the required databases (airbyte, temporal, temporal_visibility) are missing, Airbyte components will fail to start and log errors about missing databases. Solution: You need to manually create the airbyte, temporal, and temporal_visibility databases. This has been confirmed as a working solution by users and support in the Airbyte community: sql CREATE DATABASE airbyte; GRANT ALL PRIVILEGES ON DATABASE airbyte TO airbyte; CREATE DATABASE temporal; GRANT ALL PRIVILEGES ON DATABASE temporal TO airbyte; CREATE DATABASE temporal_visibility; GRANT ALL PRIVILEGES ON DATABASE temporal_visibility TO airbyte; You should run these commands as a user with sufficient privileges (often the airbyte user in internal deployments). If you are unable to connect as postgres, try connecting as airbyte or the user specified in your Helm values or environment variables. If you do not know the user, you may need to check your deployment configuration for the correct username. This approach is directly recommended in the official Airbyte forum and GitHub issues for both internal and external Postgres setups. Manually creating the databases resolves the startup errors and allows Airbyte to function properly [Forum: "Unable to create SQL database." when trying to connect to an external database](https://discuss.airbyte.io/t/1544). If you continue to have trouble connecting or creating the databases, please provide the exact error message and the user you are attempting to connect with.