Stockho, Jonathan W wrote:
I'm new to postgres, so bare with me.
I installed version 8.2 from rpms on Suse 10.
I then changed to the postgres user and ran initdb.
After that I create a database called movies using the command "createdb
movies"
Then I used the pg_ctl command to start the postmaster with the
following command:
pg_ctl start -l /tmp/pg.log -o -i
Hi Johnathan - I think this might be part of the problem. There's
usually a startup script in /etc/init.d/ and you'd start the server with
/etc/init.d/postgresql start
What might be happening is that the RPM has changed something from the
default initdb/pg_ctl.
createuser: 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 "/tmp/.s.PGSQL.0"?
You see, since we know the server is running then this socket must be
somewhere else. That suggests half of the system is looking at PG
defaults and the other half at the RPM settings.
On a side note, I also want to use TCP/IP connections. I changed the
postgresql.conf file to set LISTEN_ADDRESSES to '*'. Is there anything
else I need to do?
You'll want to update the pg_hba.conf file (and for passwords too) - see
the manuals for details.
I'd remove your existing directories (I'm assuming you've not got any
useful data there yet) and then start the database the /etc/init.d/...
way. That will probably run initdb etc. for you.
--
Richard Huxton
Archonet Ltd