我们支持两种不同的联接方式.数据库管理员将选择是否允许TCP/IP网络联接或是只允许本地(同一台机器)的socket(套接字)联接.这种选择在你与数据库联接碰到问题时就特别重要了.T
如果你在执行 Postgres 命令(如 psql 或 createdb)时碰到下面的错误输出 :
% psql template1 Connection to database 'postgres' failed. connectDB() failed: Is the postmaster running and accepting connections at 'UNIX Socket' on port '5432'?或
% psql -h localhost template1 Connection to database 'postgres' failed. connectDB() failed: Is the postmaster running and accepting TCP/IP (with -i) connections at 'localhost' on port '5432'?错误的原因通常是
你连错了服务器主机.
FATAL 1:Feb 17 23:19:55:process userid (2360) != database owner (268)表明数据库管理员用错误的用户启动了 postmaster .告诉他以Postgres超级用户身份重起.