> ## Documentation Index
> Fetch the complete documentation index at: https://enterprise-docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Postgresql 数据库

## 显示 Helm Chart 值

```bash theme={null}
helm show values dify/dify
```

以下是 Helm chart 值中 Postgresql 数据库配置的示例代码。

```yaml theme={null}
externalPostgres:
  enabled: true
  address: localhost
  port: 5432
  credentials:
    dify:
      database: "dify"
      username: "postgres"
      password: "#REPLACE_ME#"
      sslmode: "require"
    plugin_daemon:
      database: "dify_plugin_daemon"
      username: "postgres"
      password: "#REPLACE_ME#"
      sslmode: "require"
    enterprise:
      database: "enterprise"
      username: "postgres"
      password: "#REPLACE_ME#"
      sslmode: "require"
```

## `max_connections` 配置

* 如果遇到错误消息 `FATAL: remaining connection slots are reserved for non-replication superuser connections`（致命错误：剩余的连接槽位已保留给非复制超级用户连接），请增加 Postgresql 数据库的 `max_connections` 配置。

建议进行以下设置：

* 默认值为 100。
* 建议将 `max_connections` 值设置为 `2000`。
