469,111 Members | 1,985 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,111 developers. It's quick & easy.

problem getting started with PostgreSQL 8 beta 3 on XP

I installed Postgres 8 beta 3 on an XP box, with Postgres running as a
service. TaskManager tells me that postgres and postmaster are both
running. Using pgAdmin III, I can connect to the server and create
users, databases, tables, etc.

But at the command line, on the same machine where the service is
running, executing

createdb mydb

gives this:

could not connect to database template1: could not connect to server:
No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

The documentation says:

"This means that the server was not started, or it was not started where
createdb expected it."

Since pgAdmin has no trouble connecting, I assume that the server is
running and receiving connections at port 5432, so that leaves the
second part: not started where createdb expected it.

I've tried explicitly including the host, port, user, password, and that
doesn't help.

Any ideas what's going wrong here?

Steven Gollery
sg******@cadrc.calpoly.edu

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #1
2 1448
Steve Gollery <sg******@cadrc.calpoly.edu> writes:
I installed Postgres 8 beta 3 on an XP box, with Postgres running as a
service. TaskManager tells me that postgres and postmaster are both
running. Using pgAdmin III, I can connect to the server and create
users, databases, tables, etc.

But at the command line, on the same machine where the service is
running, executing
createdb mydb
gives this:

could not connect to database template1: could not connect to server:
No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?


Steve: try
createdb -h localhost mydb

Pghackers: I'm surprised that we don't have libpq set to default to
"localhost" rather than a Unix socket on platforms that haven't got Unix
sockets. A default that's guaranteed not to work seems a bit useless.

Anyone have a better idea than "localhost"?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #2
Tom,

False alarm -- I just realized that I was picking up the createdb from
an earlier failed attempt to install 7.4.5. Removing that got me to the
right command and all is well.

Thanks for the help.

Steve
Tom Lane wrote:
Steve Gollery <sg******@cadrc.calpoly.edu> writes:
I installed Postgres 8 beta 3 on an XP box, with Postgres running as a
service. TaskManager tells me that postgres and postmaster are both
running. Using pgAdmin III, I can connect to the server and create
users, databases, tables, etc.

But at the command line, on the same machine where the service is
running, executing
createdb mydb
gives this:

could not connect to database template1: could not connect to server:
No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

Steve: try
createdb -h localhost mydb

Pghackers: I'm surprised that we don't have libpq set to default to
"localhost" rather than a Unix socket on platforms that haven't got Unix
sockets. A default that's guaranteed not to work seems a bit useless.

Anyone have a better idea than "localhost"?

regards, tom lane


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

17 posts views Thread by Carmen Wai | last post: by
8 posts views Thread by dw | last post: by
2 posts views Thread by Raghuram | last post: by
8 posts views Thread by Marc G. Fournier | last post: by
1 post views Thread by Shelby Cain | last post: by
reply views Thread by Jim C. Nasby | last post: by
reply views Thread by Marc G. Fournier | last post: by
reply views Thread by Marc G. Fournier | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.