Database migration failed: (psycopg2.OperationalError) #22222

Open
opened 2026-02-21 20:16:12 -05:00 by yindo · 6 comments
Owner

Originally created by @ZTurboX on GitHub (Feb 13, 2026).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.13.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

when deploy v1.13.0 use command docker compose -p dify up -d

face the problem

worker_beat-1 | Database migration failed: (psycopg2.OperationalError) could not translate host name "db" to address: Temporary failure in name resolution
worker_beat-1 |
worker_beat-1 | (Background on this error at: https://sqlalche.me/e/20/e3q8)
worker-1 | Warning! You didn't set docs_url, redoc_url or openapi_url.
worker-1 | API Documentation will be skipped.
worker-1 | Preparing database migration...
worker-1 | Starting database migration.
worker-1 | Database migration failed: (psycopg2.OperationalError) could not translate host name "db" to address: Temporary failure in name resolution
worker-1 |
worker-1 | (Background on this error at: https://sqlalche.me/e/20/e3q8)
api-1 | Warning! You didn't set docs_url, redoc_url or openapi_url.
api-1 | API Documentation will be skipped.
api-1 | Preparing database migration...
api-1 | Starting database migration.
api-1 | Database migration failed: (psycopg2.OperationalError) could not translate host name "db" to address: Temporary failure in name resolution
api-1 |
api-1 | (Background on this error at: https://sqlalche.me/e/20/e3q8)

✔️ Expected Behavior

when deploy v1.13.0 use command docker compose -p dify up -d

face the problem

worker_beat-1 | Database migration failed: (psycopg2.OperationalError) could not translate host name "db" to address: Temporary failure in name resolution
worker_beat-1 |
worker_beat-1 | (Background on this error at: https://sqlalche.me/e/20/e3q8)
worker-1 | Warning! You didn't set docs_url, redoc_url or openapi_url.
worker-1 | API Documentation will be skipped.
worker-1 | Preparing database migration...
worker-1 | Starting database migration.
worker-1 | Database migration failed: (psycopg2.OperationalError) could not translate host name "db" to address: Temporary failure in name resolution
worker-1 |
worker-1 | (Background on this error at: https://sqlalche.me/e/20/e3q8)
api-1 | Warning! You didn't set docs_url, redoc_url or openapi_url.
api-1 | API Documentation will be skipped.
api-1 | Preparing database migration...
api-1 | Starting database migration.
api-1 | Database migration failed: (psycopg2.OperationalError) could not translate host name "db" to address: Temporary failure in name resolution
api-1 |
api-1 | (Background on this error at: https://sqlalche.me/e/20/e3q8)

Actual Behavior

No response

Originally created by @ZTurboX on GitHub (Feb 13, 2026). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.13.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce when deploy v1.13.0 use command docker compose -p dify up -d face the problem worker_beat-1 | Database migration failed: (psycopg2.OperationalError) could not translate host name "db" to address: Temporary failure in name resolution worker_beat-1 | worker_beat-1 | (Background on this error at: https://sqlalche.me/e/20/e3q8) worker-1 | Warning! You didn't set docs_url, redoc_url or openapi_url. worker-1 | API Documentation will be skipped. worker-1 | Preparing database migration... worker-1 | Starting database migration. worker-1 | Database migration failed: (psycopg2.OperationalError) could not translate host name "db" to address: Temporary failure in name resolution worker-1 | worker-1 | (Background on this error at: https://sqlalche.me/e/20/e3q8) api-1 | Warning! You didn't set docs_url, redoc_url or openapi_url. api-1 | API Documentation will be skipped. api-1 | Preparing database migration... api-1 | Starting database migration. api-1 | Database migration failed: (psycopg2.OperationalError) could not translate host name "db" to address: Temporary failure in name resolution api-1 | api-1 | (Background on this error at: https://sqlalche.me/e/20/e3q8) ### ✔️ Expected Behavior when deploy v1.13.0 use command docker compose -p dify up -d face the problem worker_beat-1 | Database migration failed: (psycopg2.OperationalError) could not translate host name "db" to address: Temporary failure in name resolution worker_beat-1 | worker_beat-1 | (Background on this error at: https://sqlalche.me/e/20/e3q8) worker-1 | Warning! You didn't set docs_url, redoc_url or openapi_url. worker-1 | API Documentation will be skipped. worker-1 | Preparing database migration... worker-1 | Starting database migration. worker-1 | Database migration failed: (psycopg2.OperationalError) could not translate host name "db" to address: Temporary failure in name resolution worker-1 | worker-1 | (Background on this error at: https://sqlalche.me/e/20/e3q8) api-1 | Warning! You didn't set docs_url, redoc_url or openapi_url. api-1 | API Documentation will be skipped. api-1 | Preparing database migration... api-1 | Starting database migration. api-1 | Database migration failed: (psycopg2.OperationalError) could not translate host name "db" to address: Temporary failure in name resolution api-1 | api-1 | (Background on this error at: https://sqlalche.me/e/20/e3q8) ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 20:16:12 -05:00
Author
Owner

@ZTurboX commented on GitHub (Feb 13, 2026):

And I upgrade from v1.9.0 to v1.13.0

@ZTurboX commented on GitHub (Feb 13, 2026): And I upgrade from v1.9.0 to v1.13.0
Author
Owner

@dosubot[bot] commented on GitHub (Feb 13, 2026):

The "could not translate host name 'db'" error is caused by a database hostname change between v1.9.0 and v1.13.0. The PostgreSQL container was renamed from db to db_postgres to support multiple database types.

Quick fix - Update your .env file:

# Change:
DB_HOST=db
# To:
DB_HOST=db_postgres

Then restart:

docker compose down
docker compose --profile postgresql up -d

Important for v1.9.0 → v1.13.0 upgrades:

  1. Database environment variables were unified - DB_USERNAME, DB_PASSWORD, DB_DATABASE replace the old POSTGRES_* variables
  2. Weaviate must be upgraded to v1.27.0+ if you use Weaviate for vector storage
  3. Back up your dify/docker/volumes directory before upgrading

It's often easier to copy fresh settings from .env.example and re-apply your customizations rather than updating the old file manually.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Feb 13, 2026): <!-- Answer --> The "could not translate host name 'db'" error is caused by a **database hostname change** between v1.9.0 and v1.13.0. The PostgreSQL container was [renamed from `db` to `db_postgres`](https://github.com/langgenius/dify/issues/29308) to support multiple database types. **Quick fix** - Update your `.env` file: ```env # Change: DB_HOST=db # To: DB_HOST=db_postgres ``` Then restart: ```bash docker compose down docker compose --profile postgresql up -d ``` **Important for v1.9.0 → v1.13.0 upgrades:** 1. [Database environment variables were unified](https://github.com/langgenius/dify/pull/29092) - `DB_USERNAME`, `DB_PASSWORD`, `DB_DATABASE` replace the old `POSTGRES_*` variables 2. [Weaviate must be upgraded to v1.27.0+](https://github.com/langgenius/dify-docs/blob/74428d260417d84ef35946bd686a25c475c382fe/en/self-host/troubleshooting/weaviate-v4-migration.mdx#L9) if you use Weaviate for vector storage 3. [Back up your `dify/docker/volumes` directory](https://github.com/langgenius/dify-docs/blob/74428d260417d84ef35946bd686a25c475c382fe/en/self-host/troubleshooting/storage-and-migration.mdx#L112) before upgrading It's often easier to [copy fresh settings from `.env.example`](https://github.com/langgenius/dify/issues/31089) and re-apply your customizations rather than updating the old file manually. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/999920d5-0ea3-4bd4-9c11-5099f5fc1cef?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/999920d5-0ea3-4bd4-9c11-5099f5fc1cef?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/999920d5-0ea3-4bd4-9c11-5099f5fc1cef?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/999920d5-0ea3-4bd4-9c11-5099f5fc1cef?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/999920d5-0ea3-4bd4-9c11-5099f5fc1cef?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/999920d5-0ea3-4bd4-9c11-5099f5fc1cef?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/999920d5-0ea3-4bd4-9c11-5099f5fc1cef?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20%22could%20not%20translate%20host%20name%20%27db%27%22%20error%20is%20caused%20by%20a%20%2A%2Adatabase%20hostname%20change%2A%2A%20between%20v1.9.0%20and%20v1.13.0.%20The%20PostgreSQL%20container%20was%20%5Brenamed%20from%20%60db%60%20to%20%60db_postgres%60%5D%28https%3A//github.com/langgenius/dify/issues/29308%29%20to%20support%20multiple%20database%20types.%0A%0A%2A%2AQuick%20fix%2A%2A%20-%20Update%20your%20%60.env%60%20file%3A%0A%60%60%60env%0A%23%20Change%3A%0ADB_HOST%3Ddb%0A%23%20To%3A%0ADB_HOST%3Ddb_postgres%0A%60%60%60%0A%0AThen%20restart%3A%0A%60%60%60bash%0Adocker%20compose%20down%0Adocker%20compose%20--profile%20postgresql%20up%20-d%0A%60%60%60%0A%0A%2A%2AImportant%20for%20v1.9.0%20%E2%86%92%20v1.13.0%20upgrades%3A%2A%2A%0A1.%20%5BDatabase%20environment%20variables%20were%20unified%5D%28https%3A//github.com/langgenius/dify/pull/29092%29%20-%20%60DB_USERNAME%60%2C%20%60DB_PASSWORD%60%2C%20%60DB_DATABASE%60%20replace%20the%20old%20%60POSTGRES_%2A%60%20variables%0A2.%20%5BWeaviate%20must%20be%20upgraded%20to%20v1.27.0%2B%5D%28https%3A//github.com/langgenius/dify-docs/blob/74428d260417d84ef35946bd686a25c475c382fe/en/self-host/troubleshooting/weaviate-v4-migration.mdx%23L9%29%20if%20you%20use%20Weaviate%20for%20vector%20storage%0A3.%20%5BBack%20up%20your%20%60dify/docker/volumes%60%20directory%5D%28https%3A//github.com/langgenius/dify-docs/blob/74428d260417d84ef35946bd686a25c475c382fe/en/self-host/troubleshooting/storage-and-migration.mdx%23L112%29%20before%20upgrading%0A%0AIt%27s%20often%20easier%20to%20%5Bcopy%20fresh%20settings%20from%20%60.env.example%60%5D%28https%3A//github.com/langgenius/dify/issues/31089%29%20and%20re-apply%20your%20customizations%20rather%20than%20updating%20the%20old%20file%20manually.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/32318)
Author
Owner

@ZTurboX commented on GitHub (Feb 13, 2026):

Any other config should change in .env when upgrade from v1.9.0 to v.1.13.0 , I do not want to use .env.example

@ZTurboX commented on GitHub (Feb 13, 2026): Any other config should change in .env when upgrade from v1.9.0 to v.1.13.0 , I do not want to use .env.example
Author
Owner

@dosubot[bot] commented on GitHub (Feb 13, 2026):

Here are the key .env changes you need for v1.9.0 → v1.13.0:

Required changes:

# Database hostname change
DB_HOST=db_postgres  # was "db"

# New required variables
DB_TYPE=postgresql
COMPOSE_PROFILES=${VECTOR_STORE:-weaviate},${DB_TYPE:-postgresql}

# Unified database credentials (replace old POSTGRES_* vars)
DB_USERNAME=postgres
DB_PASSWORD=difyai123456
DB_DATABASE=dify

The old POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB variables were deprecated in favor of the unified DB_* format.

If using Weaviate (required changes):

  • Update image to semitechnologies/weaviate:1.27.0
  • Expose gRPC port 50051 in addition to HTTP port 8080

File permissions (v1.10.1+ runs as non-root):

sudo chown -R 1001:1001 ./volumes/app/storage

Optional new variables:

  • ENFORCE_LANGGENIUS_PLUGIN_SIGNATURES=true (plugin signature verification)
  • WEAVIATE_DISABLE_TELEMETRY=false (disable Weaviate telemetry)

There's also a helper script dify-env-sync.sh available in the docker directory that can help you compare and sync .env changes while preserving your customizations.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Feb 13, 2026): <!-- Answer --> Here are the key .env changes you need for v1.9.0 → v1.13.0: **Required changes:** ```env # Database hostname change DB_HOST=db_postgres # was "db" # New required variables DB_TYPE=postgresql COMPOSE_PROFILES=${VECTOR_STORE:-weaviate},${DB_TYPE:-postgresql} # Unified database credentials (replace old POSTGRES_* vars) DB_USERNAME=postgres DB_PASSWORD=difyai123456 DB_DATABASE=dify ``` [The old `POSTGRES_USER`, `POSTGRES_PASSWORD`, `POSTGRES_DB` variables were deprecated](https://github.com/langgenius/dify/pull/29092) in favor of the unified `DB_*` format. **If using Weaviate** ([required changes](https://github.com/langgenius/dify/issues/29386)): - Update image to `semitechnologies/weaviate:1.27.0` - Expose gRPC port `50051` in addition to HTTP port `8080` **File permissions** ([v1.10.1+ runs as non-root](https://github.com/langgenius/dify/discussions/29865)): ```bash sudo chown -R 1001:1001 ./volumes/app/storage ``` **Optional new variables:** - `ENFORCE_LANGGENIUS_PLUGIN_SIGNATURES=true` (plugin signature verification) - `WEAVIATE_DISABLE_TELEMETRY=false` (disable Weaviate telemetry) There's also a [helper script `dify-env-sync.sh`](https://github.com/langgenius/dify/pull/29845) available in the docker directory that can help you compare and sync .env changes while preserving your customizations. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/e4d4a44f-25fa-49a3-864e-894d75c34b61?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/e4d4a44f-25fa-49a3-864e-894d75c34b61?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/e4d4a44f-25fa-49a3-864e-894d75c34b61?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/e4d4a44f-25fa-49a3-864e-894d75c34b61?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/e4d4a44f-25fa-49a3-864e-894d75c34b61?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/e4d4a44f-25fa-49a3-864e-894d75c34b61?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/e4d4a44f-25fa-49a3-864e-894d75c34b61?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Here%20are%20the%20key%20.env%20changes%20you%20need%20for%20v1.9.0%20%E2%86%92%20v1.13.0%3A%0A%0A%2A%2ARequired%20changes%3A%2A%2A%0A%60%60%60env%0A%23%20Database%20hostname%20change%0ADB_HOST%3Ddb_postgres%20%20%23%20was%20%22db%22%0A%0A%23%20New%20required%20variables%0ADB_TYPE%3Dpostgresql%0ACOMPOSE_PROFILES%3D%24%7BVECTOR_STORE%3A-weaviate%7D%2C%24%7BDB_TYPE%3A-postgresql%7D%0A%0A%23%20Unified%20database%20credentials%20%28replace%20old%20POSTGRES_%2A%20vars%29%0ADB_USERNAME%3Dpostgres%0ADB_PASSWORD%3Ddifyai123456%0ADB_DATABASE%3Ddify%0A%60%60%60%0A%0A%5BThe%20old%20%60POSTGRES_USER%60%2C%20%60POSTGRES_PASSWORD%60%2C%20%60POSTGRES_DB%60%20variables%20were%20deprecated%5D%28https%3A//github.com/langgenius/dify/pull/29092%29%20in%20favor%20of%20the%20unified%20%60DB_%2A%60%20format.%0A%0A%2A%2AIf%20using%20Weaviate%2A%2A%20%28%5Brequired%20changes%5D%28https%3A//github.com/langgenius/dify/issues/29386%29%29%3A%0A-%20Update%20image%20to%20%60semitechnologies/weaviate%3A1.27.0%60%0A-%20Expose%20gRPC%20port%20%6050051%60%20in%20addition%20to%20HTTP%20port%20%608080%60%0A%0A%2A%2AFile%20permissions%2A%2A%20%28%5Bv1.10.1%2B%20runs%20as%20non-root%5D%28https%3A//github.com/langgenius/dify/discussions/29865%29%29%3A%0A%60%60%60bash%0Asudo%20chown%20-R%201001%3A1001%20./volumes/app/storage%0A%60%60%60%0A%0A%2A%2AOptional%20new%20variables%3A%2A%2A%0A-%20%60ENFORCE_LANGGENIUS_PLUGIN_SIGNATURES%3Dtrue%60%20%28plugin%20signature%20verification%29%0A-%20%60WEAVIATE_DISABLE_TELEMETRY%3Dfalse%60%20%28disable%20Weaviate%20telemetry%29%0A%0AThere%27s%20also%20a%20%5Bhelper%20script%20%60dify-env-sync.sh%60%5D%28https%3A//github.com/langgenius/dify/pull/29845%29%20available%20in%20the%20docker%20directory%20that%20can%20help%20you%20compare%20and%20sync%20.env%20changes%20while%20preserving%20your%20customizations.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/32318)
Author
Owner

@ZTurboX commented on GitHub (Feb 13, 2026):

should change all POSTGRES_* config to DB_* like POSTGRES_MAX_CONNECTIONS

@ZTurboX commented on GitHub (Feb 13, 2026): should change all POSTGRES_* config to DB_* like POSTGRES_MAX_CONNECTIONS
Author
Owner

@dosubot[bot] commented on GitHub (Feb 13, 2026):

No, not all POSTGRES_* variables need to change. Only the connection credentials were unified to DB_*:

Renamed to DB_*:

  • POSTGRES_USERDB_USERNAME
  • POSTGRES_PASSWORDDB_PASSWORD
  • POSTGRES_DBDB_DATABASE

Keep POSTGRES_ prefix* (these are PostgreSQL server-level settings):

  • POSTGRES_MAX_CONNECTIONS
  • POSTGRES_SHARED_BUFFERS
  • POSTGRES_WORK_MEM
  • POSTGRES_MAINTENANCE_WORK_MEM
  • POSTGRES_EFFECTIVE_CACHE_SIZE
  • POSTGRES_STATEMENT_TIMEOUT
  • POSTGRES_IDLE_IN_TRANSACTION_SESSION_TIMEOUT

Application connection pool settings use SQLALCHEMY_* prefix:

  • SQLALCHEMY_POOL_SIZE (default: 30)
  • SQLALCHEMY_MAX_OVERFLOW (default: 10)
  • SQLALCHEMY_POOL_RECYCLE (default: 3600)

So keep your POSTGRES_MAX_CONNECTIONS as is - it's still the correct variable name.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Feb 13, 2026): <!-- Answer --> No, not all `POSTGRES_*` variables need to change. Only the **connection credentials** were unified to `DB_*`: **Renamed to DB_*:** - `POSTGRES_USER` → `DB_USERNAME` - `POSTGRES_PASSWORD` → `DB_PASSWORD` - `POSTGRES_DB` → `DB_DATABASE` **Keep POSTGRES_* prefix** (these are [PostgreSQL server-level settings](https://github.com/langgenius/dify/blob/c7bbe050885c27c51ab6549ca18085ccec36a6d7/docker/middleware.env.example)): - `POSTGRES_MAX_CONNECTIONS` - `POSTGRES_SHARED_BUFFERS` - `POSTGRES_WORK_MEM` - `POSTGRES_MAINTENANCE_WORK_MEM` - `POSTGRES_EFFECTIVE_CACHE_SIZE` - `POSTGRES_STATEMENT_TIMEOUT` - `POSTGRES_IDLE_IN_TRANSACTION_SESSION_TIMEOUT` **Application connection pool settings** use [SQLALCHEMY_* prefix](https://github.com/langgenius/dify/blob/c7bbe050885c27c51ab6549ca18085ccec36a6d7/api/configs/middleware/__init__.py): - `SQLALCHEMY_POOL_SIZE` (default: 30) - `SQLALCHEMY_MAX_OVERFLOW` (default: 10) - `SQLALCHEMY_POOL_RECYCLE` (default: 3600) So keep your `POSTGRES_MAX_CONNECTIONS` as is - it's still the correct variable name. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/331a92c7-cf68-4ff3-b36d-0842fb74c00a?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/331a92c7-cf68-4ff3-b36d-0842fb74c00a?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/331a92c7-cf68-4ff3-b36d-0842fb74c00a?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/331a92c7-cf68-4ff3-b36d-0842fb74c00a?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/331a92c7-cf68-4ff3-b36d-0842fb74c00a?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/331a92c7-cf68-4ff3-b36d-0842fb74c00a?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/331a92c7-cf68-4ff3-b36d-0842fb74c00a?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=No%2C%20not%20all%20%60POSTGRES_%2A%60%20variables%20need%20to%20change.%20Only%20the%20%2A%2Aconnection%20credentials%2A%2A%20were%20unified%20to%20%60DB_%2A%60%3A%0A%0A%2A%2ARenamed%20to%20DB_%2A%3A%2A%2A%0A-%20%60POSTGRES_USER%60%20%E2%86%92%20%60DB_USERNAME%60%0A-%20%60POSTGRES_PASSWORD%60%20%E2%86%92%20%60DB_PASSWORD%60%0A-%20%60POSTGRES_DB%60%20%E2%86%92%20%60DB_DATABASE%60%0A%0A%2A%2AKeep%20POSTGRES_%2A%20prefix%2A%2A%20%28these%20are%20%5BPostgreSQL%20server-level%20settings%5D%28https%3A//github.com/langgenius/dify/blob/c7bbe050885c27c51ab6549ca18085ccec36a6d7/docker/middleware.env.example%29%29%3A%0A-%20%60POSTGRES_MAX_CONNECTIONS%60%0A-%20%60POSTGRES_SHARED_BUFFERS%60%0A-%20%60POSTGRES_WORK_MEM%60%0A-%20%60POSTGRES_MAINTENANCE_WORK_MEM%60%0A-%20%60POSTGRES_EFFECTIVE_CACHE_SIZE%60%0A-%20%60POSTGRES_STATEMENT_TIMEOUT%60%0A-%20%60POSTGRES_IDLE_IN_TRANSACTION_SESSION_TIMEOUT%60%0A%0A%2A%2AApplication%20connection%20pool%20settings%2A%2A%20use%20%5BSQLALCHEMY_%2A%20prefix%5D%28https%3A//github.com/langgenius/dify/blob/c7bbe050885c27c51ab6549ca18085ccec36a6d7/api/configs/middleware/__init__.py%29%3A%0A-%20%60SQLALCHEMY_POOL_SIZE%60%20%28default%3A%2030%29%0A-%20%60SQLALCHEMY_MAX_OVERFLOW%60%20%28default%3A%2010%29%0A-%20%60SQLALCHEMY_POOL_RECYCLE%60%20%28default%3A%203600%29%0A%0ASo%20keep%20your%20%60POSTGRES_MAX_CONNECTIONS%60%20as%20is%20-%20it%27s%20still%20the%20correct%20variable%20name.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/32318)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#22222