472,111 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,111 software developers and data experts.

Initalizing PostgreSQL Database

KG


I'm getting the following error message when I try to create a user or database
on postgresql 7.2.2 on Freebsd 4.7, I installed it from the ports directory but
I'm stumped when I got the following error message. When I do a
/usr/local/etc/rc.d/010.pgsql.sh start all I get is this:

freebsd# sh 010.pgsql.sh start
pgsqlfreebsd#

$ createdb test1
psql: 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"?
createdb: database creation failed
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 11 '05 #1
4 1594
On Monday 15 September 2003 15:10, KG wrote:
I'm getting the following error message when I try to create a user or
database on postgresql 7.2.2 on Freebsd 4.7, I installed it from the ports
directory but I'm stumped when I got the following error message. When I do
I don't know anything about the BSDs but 7.2.4 was the last of the 7.2 series
- upgrade if at all possible.
$ createdb test1
psql: 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"?
createdb: database creation failed


Does a "ps" show anything running (postmaster)? I'm guessing not, since it
can't find the socket.
Have you run "initdb"? You need to do this to initialise the system, create
required files etc. I don't know if your startup script does this for you.
Is the "postgres" or "pgsql" (or whatever) user setup, does it have permission
to access your target data/base directory?

--
Richard Huxton
Archonet Ltd

---------------------------(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 11 '05 #2
KG <li***@i2iwebsolutions.com> writes:
I'm stumped when I got the following error message. When I do a
/usr/local/etc/rc.d/010.pgsql.sh start all I get is this:
freebsd# sh 010.pgsql.sh start
pgsqlfreebsd#


There are a lot of shoddy start scripts running around :-(. Yours is
probably dumping the postmaster's stderr output to /dev/null, so
whatever error message it puts out about being unable to start is
just vanishing. Or, if you're lucky, stderr is being sent to a logfile
you can look at. I'd suggest modifying the script if necessary so that
you can see what the postmaster is complaining about.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 11 '05 #3
KG
Quoting Richard Huxton <de*@archonet.com>:
On Monday 15 September 2003 15:10, KG wrote:
I'm getting the following error message when I try to create a user or
database on postgresql 7.2.2 on Freebsd 4.7, I installed it from the ports
directory but I'm stumped when I got the following error message. When I do

I don't know anything about the BSDs but 7.2.4 was the last of the 7.2 series

- upgrade if at all possible.
$ createdb test1
psql: 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"?
createdb: database creation failed


Does a "ps" show anything running (postmaster)? I'm guessing not, since it
can't find the socket.
Have you run "initdb"? You need to do this to initialise the system, create
required files etc. I don't know if your startup script does this for you.
Is the "postgres" or "pgsql" (or whatever) user setup, does it have
permission
to access your target data/base directory?

--
Richard Huxton
Archonet Ltd

Thanks I figured it out. I went to the /usr/local/pgsql directory and ran
initdb. All is well now.

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



---------------------------(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 11 '05 #4
>>>>> "TL" == Tom Lane <tg*@sss.pgh.pa.us> writes:

TL> KG <li***@i2iwebsolutions.com> writes:
I'm stumped when I got the following error message. When I do a
/usr/local/etc/rc.d/010.pgsql.sh start all I get is this:
freebsd# sh 010.pgsql.sh start
pgsqlfreebsd#


TL> There are a lot of shoddy start scripts running around :-(. Yours is
TL> probably dumping the postmaster's stderr output to /dev/null, so
TL> whatever error message it puts out about being unable to start is

The one in the FreeBSD port doesn't fall into that category... look in
/var/log/postgres.log or something similar to that name.

Looks like he never ran initdb...

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: kh***@kciLink.com Rockville, MD +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 11 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Otis Green | last post: by
33 posts views Thread by Joshua D. Drake | last post: by
26 posts views Thread by jini us | last post: by
29 posts views Thread by Paul Ganainm | last post: by
59 posts views Thread by Jeff Bowden | last post: by
1 post views Thread by phil campaigne | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.