Renu Fulmali
07/23/2025, 9:52 AMkapa.ai
07/23/2025, 9:53 AM2025-07-22 07:00:47.671 UTC [25] FATAL: database "airbyte_db" does not exist
indicates that Airbyte (or a related process) is trying to connect to a PostgreSQL database named airbyte_db, but that database has not been created yet. This is a common issue when setting up Airbyte with an external or freshly initialized PostgreSQL instance. Airbyte expects certain databases (such as airbyte, temporal, and temporal_visibility) to exist. If they do not, Airbyte will fail to connect and log errors like the one above. You need to manually create the required databases before starting Airbyte. Solution: Connect to your PostgreSQL server and run the following commands (adjust the database names if your configuration uses different names): sql CREATE DATABASE airbyte_db; -- Optionally, grant privileges to the Airbyte user: GRANT ALL PRIVILEGES ON DATABASE airbyte_db TO airbyte;
If you are using Airbyte with Temporal, you may also need to create the temporal and temporal_visibility databases and grant privileges, as described in the official support answer: 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;
[Forum: Unable to create SQL database](https://discuss.airbyte.io/t/1544) [Github: External Postgres Database Setup Issues](https://github.com/airbytehq/airbyte/issues/49304) [Github: Unable to install Airbyte locally - Unable to connect to the database](https://github.com/airbytehq/airbyte/issues/45456) Summary: You need to manually create the database(s) that Airbyte expects to connect to. Once created, restart Airbyte and the error should be resolved. If you continue to see errors, double-check your Airbyte configuration to ensure the database name matches what you have created.Renu Fulmali
07/23/2025, 9:54 AMRenu Fulmali
07/23/2025, 9:55 AMkapa.ai
07/23/2025, 9:55 AMRenu Fulmali
07/23/2025, 9:55 AMkapa.ai
07/23/2025, 9:55 AMkapa.ai
07/23/2025, 9:55 AMFATAL: database "airbyte_db" does not exist
, there are a few possible reasons based on the knowledge sources: 1. Database Name Mismatch: Double-check that the database name in your Airbyte configuration (values.yaml
) matches exactly the name of the database that was created. For example, if your config expects airbyte_db
but the Helm chart created airbyte
, you will see this error. The database name key in the Helm chart can be either database
or name
depending on the chart version, so ensure consistency between your secret, values file, and the actual database name [see docs](https://docs.airbyte.com/platform/next/deploying-airbyte/integrations/database). 2. Permissions Issue: Even if the database exists, the Airbyte user may not have the correct privileges to access it. Make sure the user specified in your secret has all privileges on the database. This is a common issue and is mentioned in the official support answer [see forum post](https://discuss.airbyte.io/t/1544). 3. Helm Chart/Pod Timing: Sometimes, the Airbyte pods may start before the database is fully ready, especially on the first install. This can cause initial connection failures. In some cases, running the Helm install command again or increasing the Helm timeout can help, as noted by users who had to run the install twice or set a longer timeout [see issue comment](https://github.com/airbytehq/airbyte/issues/49304). 4. Multiple Databases Required: Airbyte (and Temporal, if used) may require multiple databases (airbyte
, temporal
, temporal_visibility
). If only one is created, the others must be created manually [see forum post](https://discuss.airbyte.io/t/1544). If the Helm chart is supposed to create the database but you still get this error, check: - The actual databases present in your Postgres instance. - The values in your values.yaml
and secrets. - The Airbyte pod logs for more specific errors about which database or user is missing. If everything matches and the error persists, you may need to manually create the missing database(s) and grant the correct privileges, as this has resolved the issue for other users [see issue comment](https://github.com/airbytehq/airbyte/issues/45456). If you need more specific troubleshooting, please provide the relevant section of your values.yaml
and the output of \l
(list databases) from your Postgres instance.Renu Fulmali
07/23/2025, 9:57 AMkapa.ai
07/23/2025, 9:57 AMkapa.ai
07/23/2025, 9:57 AMairbyte-db
), Airbyte should automatically create the required databases and set up the schema during the initial startup. However, if you are seeing errors such as: FATAL: database "airbyte_db" does not exist
while using the internal database, this typically means that the internal Postgres container either failed to initialize properly or is not running as expected. This can happen if: - The Postgres container failed to start due to a port conflict or another process already using the port (commonly 5432). For example, logs like: could not bind IPv6 address "::": Address in use FATAL: could not create any TCP/IP sockets
indicate a port conflict or another Postgres instance running on the same port ([see forum post](https://discuss.airbyte.io/t/4336)). - The database files were corrupted or not initialized correctly. What you can do: 1. Check for Port Conflicts: Make sure no other Postgres instance is running on port 5432 on your host. Stop any other Postgres containers or services if necessary. 2. Clean Up and Restart: If you are running Airbyte via Docker Compose, try stopping all containers, removing volumes, and starting again: bash docker-compose down -v docker-compose up
This will remove the existing database volume and force Airbyte to reinitialize the internal database. 3. Check Logs: Review the logs of the airbyte-db
container for any errors during startup. If you see repeated failures, it is likely a port or file system issue. If these steps do not resolve the issue, please provide the full logs from the airbyte-db
container for further troubleshooting. Summary: When using the internal database, Airbyte should handle all database creation automatically. Errors about missing databases usually point to startup or port issues with the internal Postgres container, not a manual setup problem.Renu Fulmali
07/23/2025, 9:59 AMkapa.ai
07/23/2025, 9:59 AMkapa.ai
07/23/2025, 9:59 AMairbyte_db
which does not exist: 2025-07-22 07:00:47.671 UTC [25] FATAL: database "airbyte_db" does not exist
This situation can occur if the Airbyte application is configured (via environment variables or configuration files) to look for a database named airbyte_db
, but the internal Postgres instance did not create it, or it created a database with a different name (such as the default airbyte
). Key points from the knowledge sources: - When using the internal database, Airbyte should automatically create the required databases on startup. If the database does not exist, it may be due to a misconfiguration or a failed initialization process ([see related issue](https://github.com/airbytehq/airbyte/issues/45456)). - A mismatch between the configured database name and the actual database name in Postgres will cause this error. For example, if Airbyte is configured to use airbyte_db
but only airbyte
exists, you will see this FATAL error ([see issue](https://github.com/airbytehq/airbyte/issues/45456)). - If you have previously changed environment variables such as DATABASE_DB
, DATABASE_URL
, or similar, ensure they match the actual database name created by the internal Postgres instance ([see forum answer](https://discuss.airbyte.io/t/557)). What you should do: 1. Check your Airbyte configuration (environment variables or docker-compose.yaml
) for any database name overrides. Make sure the database name matches what the internal Postgres is set up to create (usually airbyte
by default). 2. If you have persistent volumes, try removing them and restarting Airbyte to force a fresh initialization: bash docker-compose down -v docker-compose up
This will clear any old or mismatched database state and allow Airbyte to recreate the database as expected. If after these steps the problem persists, please provide your Airbyte configuration and the full logs from both the airbyte-db
and airbyte-bootloader
containers for further troubleshooting. If you need to manually create the database (which should not be necessary for the internal DB, but has resolved similar issues for others), you can do so by connecting to the Postgres container and running: sql CREATE DATABASE airbyte_db;
But ideally, fixing the configuration mismatch should resolve the issue without manual intervention. If you need more specific guidance, please share your configuration details.Renu Fulmali
07/23/2025, 10:12 AMkapa.ai
07/23/2025, 10:12 AMkapa.ai
07/23/2025, 10:12 AMvalues.yaml
configuration: yaml database: type: "internal" # Use internal PostgreSQL host: "airbyte-postgresql" # Matches the PostgreSQL service name port: "5432" database: "airbyte_db" user: "airbyte" password: "airbyte" # Hardcoded password
Issue: Your logs show: FATAL: database "airbyte_db" does not exist
This means Airbyte is trying to connect to a database named airbyte_db
, but the internal Postgres instance did not create it. What the knowledge sources say: - By default, Airbyte’s internal Postgres database creates a database named airbyte
, not airbyte_db
. If you specify a different name (like airbyte_db
), you must ensure that the internal Postgres is also configured to create a database with that name. Otherwise, you will get this error [see related issue](https://github.com/airbytehq/airbyte/issues/45456). - The documentation and examples for internal databases typically use airbyte
as the default database name [see docs](https://docs.airbyte.com/platform/next/deploying-airbyte/integrations/database). How to fix: - Change your values.yaml
to use the default database name: yaml database: type: "internal" host: "airbyte-postgresql" port: "5432" database: "airbyte" user: "airbyte" password: "airbyte"
- Then, restart your Airbyte deployment. If you are using persistent volumes, you may need to remove them to allow Airbyte to reinitialize the internal database: bash docker-compose down -v docker-compose up
(or the equivalent Helm commands if using Kubernetes) Summary: The internal Airbyte Postgres instance creates a database named airbyte
by default. If you set database: "airbyte_db"
in your config, but the internal DB is not set up to create that database, you will get a "does not exist" error. Change the database name in your config to airbyte
to match the default behavior, then restart Airbyte. This should resolve your issue. If you need to use a different database name, you would have to ensure the internal Postgres is initialized with that name, but this is not the standard or documented approach for Airbyte’s internal database.Renu Fulmali
07/23/2025, 10:16 AMkapa.ai
07/23/2025, 10:16 AMkapa.ai
07/23/2025, 10:16 AMairbyte_db
but now fails, there are a few possible explanations based on the knowledge sources: 1. Persistence and Volume Reset: If you were using Docker or Kubernetes and deleted the persistent volume (or used docker-compose down -v
), the internal Postgres database would have been reset. On restart, the internal Postgres container would only create the default airbyte
database, not your custom airbyte_db
. This would explain why it worked before (when the database existed) and now fails (after a reset, the custom database no longer exists)Â [see related issue](https://github.com/airbytehq/airbyte/issues/45456). 2. Manual Creation: If you manually created airbyte_db
inside the internal Postgres container at some point, Airbyte would have worked until the database or its volume was deleted. The internal Postgres setup does not automatically recreate custom-named databases after a reset or fresh install—only the default airbyte
database is created [see forum answer](https://discuss.airbyte.io/t/557). 3. Configuration Drift: If your configuration or deployment method changed (for example, switching between internal and external Postgres, or changing Helm chart versions), the initialization logic may have changed, resulting in the custom database not being created automatically. Summary: The internal Airbyte Postgres database only creates the default airbyte
database on initialization. If you use a custom name like airbyte_db
, you must manually create it every time the database is reset or the volume is deleted. This is not the standard or supported approach for the internal database, and is why you are now seeing the error after a reset or redeployment. Recommendation: - Use the default database name airbyte
in your configuration for the internal database. - If you must use a custom name, you will need to manually create the database inside the Postgres container every time the internal database is reinitialized. If you need more robust support for custom database names, consider using an external Postgres instance where you control the initialization process [see docs](https://docs.airbyte.com/platform/next/deploying-airbyte/integrations/database). If you need step-by-step instructions for manually creating the database inside the internal Postgres container, let me know!Renu Fulmali
07/23/2025, 10:22 AMkapa.ai
07/23/2025, 10:22 AMkapa.ai
07/23/2025, 10:22 AMairbyte_db
database. Based on the knowledge sources, when using the internal database, Airbyte’s default behavior is to create a database named `airbyte`—not airbyte_db
. If your configuration specifies airbyte_db
and you did not manually create it, Airbyte will not create this custom-named database for you, and you will encounter the error: FATAL: database "airbyte_db" does not exist
There is no information in the knowledge sources indicating that Airbyte’s internal Postgres will automatically create a database with a custom name if specified in the configuration. The default and documented behavior is to create a database named airbyte
when using the internal database. If it worked previously, it may have been due to a leftover state or a previous manual intervention, but this is not the expected or supported behavior according to the documentation and community discussions. To resolve this: - Change your configuration to use the default database name `airbyte`: yaml database: type: "internal" host: "airbyte-postgresql" port: "5432" database: "airbyte" user: "airbyte" password: "airbyte"
- Restart your Airbyte deployment. If you continue to use airbyte_db
as the database name with the internal database, you will need to manually create it, as Airbyte will not do this for you automatically. If you have not made any manual changes and are using the internal database, the only supported and reliable approach is to use the default database name airbyte
as per the documentation. If you need to use a custom database name, consider switching to an external Postgres instance where you have full control over database creation ([see documentation](https://docs.airbyte.com/platform/next/deploying-airbyte/integrations/database)).