我与postgres
一起运行-k /tmp/tmp-postgres/
,但我与主要帖子发生了端口冲突。
我正在运行另一个postgres监听该端口,但我的印象是,使用套接字目录集运行会使它使用unix套接字而不是tcp,并且它不需要tcp端口。我做错了什么?
/usr/lib/postgresql/9.4/bin/postgres -F -k /tmp/tmp-postgres/ -D /tmp/tmp-postgres/
LOG: could not bind IPv6 socket: Address already in use
HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
LOG: could not bind IPv4 socket: Address already in use
HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
WARNING: could not create listen socket for "localhost"
FATAL: could not create any TCP/IP sockets
这里的上下文是为集成测试设置临时postgres;我对其他方法持开放态度。
答案 0 :(得分:1)
在另一个目录中初始化数据库并在另一个端口上启动它并尝试在该端口上连接。