Hi, I am trying to setup Airbyte using official he...
# replication-ask-ai
j
Hi, I am trying to setup Airbyte using official helm on K8S. I am getting the following error from temporal while using external postgresDB.
Copy code
2023-07-06T11:03:57.281Z        ERROR   Unable to create SQL database.  {"error": "pq: database \"temporal\" already exists", "logging-call-at": "handler.go:97"}
k
A message from kapa.ai
This error message indicates that the
temporal
database already exists in your external PostgreSQL database. This could happen if you have previously deployed Airbyte and are trying to redeploy it without deleting the existing databases. One solution could be to manually create the databases
temporal
and
temporal_visibility
in your PostgreSQL server and assign permissions to the Airbyte user. Here is the code required to be run if connecting to the Postgres server using psql:
Copy code
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;
(Source: [Slack Conversation](https://airbytehq.slack.com/archives/C021JANJ6TY/p1673217066302239)) If this doesn't solve the issue, you might want to check if you have deleted the existing containers that were created before trying to separate the database. Here's a relevant thread that might be helpful: [Airbyte Server unable to start after configuring an external database backend](https://discuss.airbyte.io/t/airbyte-server-unable-to-start-after-configuring-an-external-database-backend/554). If you're still facing issues, it would be best to create a GitHub issue so that the Airbyte team can assist you further.
g
I usually just delete the existing temporal databases. They only contain state for running jobs, so can be safely deleted. Airbyte will recreate them on deployment