gpt4 book ai didi

database - pgpool 无法创建数据库

转载 作者:行者123 更新时间:2023-11-29 14:12:25 25 4
gpt4 key购买 nike

我已经使用命令启动了pgpool

sudo pgpool -n &

它开始在终端上给出以下消息:

2012-05-04 10:54:29 LOG: pid 4109: pgpool-II successfully started. version 2.3.2.1 (tomiteboshi)

但是当我尝试运行以下命令时:

createdb -p 9999 bench_replication

我收到以下错误消息:

createdb: could not connect to database postgres: could not connect to server: No such file or directory. Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.9999"?

当我将端口从 9999 更改为 5432 时,数据库 bench_replication 仅在本地节点上创建,而不是在从属节点上创建。但是,教程说要在此命令中提及端口 9999,以便通过 pgpool 在所有从属节点上创建数据库 bench_replication

为了确认 pgpool 是否真的在运行,我使用命令停止了 pgpool

2012-05-04 10:58:50 LOG:   pid 4109: received smart shutdown request
stop request sent to pgpool. waiting for termination...done.
[1]+ Done sudo -A pgpool -n

这证实了 pgpool 确实在运行。我究竟做错了什么?我已按照网上标准教程中的说明更改了我所有的 pgpool 配置文件。

最佳答案

试试这个命令:

createdb -p 9999 -h 127.0.0.1 bench_replication

默认情况下 PostgreSQL 尝试使用套接字。

关于database - pgpool 无法创建数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10443171/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com