You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在Trino中配置两个PostgreSQL数据库连接器仅显示一个的问题

解决Trino仅显示单个PostgreSQL数据库的问题

你当前的问题出在同一个catalog配置文件里重复定义了连接参数,Trino会忽略重复的配置项,只保留最后一组生效的参数,所以只能看到report数据库。

Trino的每个catalog对应一个独立的数据源(这里就是单个PostgreSQL数据库),正确的做法是为每个PostgreSQL数据库创建单独的catalog配置文件:

  1. 进入Trino的catalog目录
  2. 创建第一个配置文件,比如命名为postgres_db.properties,内容如下:
    connector.name=postgresql
    connection-url=jdbc:postgresql://localhost:5432/postgres
    connection-user=postgres
    connection-password=postgres
    case-insensitive-name-matching=true
    
  3. 创建第二个配置文件,比如命名为report_db.properties,内容如下:
    connector.name=postgresql
    connection-url=jdbc:postgresql://localhost:5432/report
    connection-user=postgres
    connection-password=postgres
    case-insensitive-name-matching=true
    
  4. 重启Trino服务

完成后,你在Trino中就能看到两个新的catalog(postgres_db和report_db),分别对应你的两个PostgreSQL数据库。

内容的提问来源于stack exchange,提问作者Anahita barzegar

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.28 20:37:33