diff --git a/docs/docs/Develop/configuration-custom-database.mdx b/docs/docs/Develop/configuration-custom-database.mdx index 581d47f060..5ac46ccad0 100644 --- a/docs/docs/Develop/configuration-custom-database.mdx +++ b/docs/docs/Develop/configuration-custom-database.mdx @@ -13,7 +13,7 @@ Langflow can more efficiently handle multiple users and larger workloads by usin ## Prerequisites -- A [PostgreSQL](https://www.pgadmin.org/download/) database +- A [PostgreSQL](https://www.pgadmin.org/download/) database version 15 or later ## Connect Langflow to a local PostgreSQL database diff --git a/docs/docs/Develop/enterprise-database-guide.mdx b/docs/docs/Develop/enterprise-database-guide.mdx index d9f22a8eca..071063b945 100644 --- a/docs/docs/Develop/enterprise-database-guide.mdx +++ b/docs/docs/Develop/enterprise-database-guide.mdx @@ -23,7 +23,7 @@ For more information, see [Configure an external PostgreSQL database](/configura 1. Set up PostgreSQL: - 1. Deploy a PostgreSQL instance (version 12 or higher recommended) using a local server, Docker, or a managed cloud service. + 1. Deploy a PostgreSQL instance (version 15 or later) using a local server, Docker, or a managed cloud service. 2. Create a database for Langflow. 3. Create a PostgreSQL user with appropriate, minimal permissions to manage and write to the database, such as CREATE, SELECT, INSERT, UPDATE, DELETE on your Langflow tables. diff --git a/docs/docs/Support/troubleshooting.mdx b/docs/docs/Support/troubleshooting.mdx index e613203a75..3b3c76dba3 100644 --- a/docs/docs/Support/troubleshooting.mdx +++ b/docs/docs/Support/troubleshooting.mdx @@ -169,6 +169,21 @@ This error occurs because `asyncpg` has stricter timezone handling than `psycopg To resolve this issue, remove `asyncpg` from your installation and use `psycopg2` instead. +### PostgreSQL version mismatch: `UNIQUE NULLS DISTINCT` syntax error + +The following error can occur when initializing Langflow with a PostgreSQL database: + +```text +(psycopg.errors.SyntaxError) syntax error at or near "NULLS" +LINE 13: CONSTRAINT file_name_user_id_key UNIQUE NULLS DISTINCT (nam... +``` + +This occurs when you're using a PostgreSQL version prior to version 15. +These versions don't support the `UNIQUE NULLS DISTINCT` syntax used by Langflow's database schema. +Langflow requires PostgreSQL 15 or higher when configured to use PostgreSQL. + +To resolve this issue, upgrade your PostgreSQL instance to version 15 or higher, and then restart Langflow. + ### An API key must be passed as query or header The following error can occur when attempting to sign up on the Langflow sign in page: `An API key must be passed as query or header`.