Apologies if this is sent twice, but I sent this Email this morning and
haven't received it yet. Posting a second time...
<<
I'm having some difficulties with pgaccess in mandrake 8.0. It loads up
fine, but I can't actually do anything with it. If I try to create a
database, I get the following error message:
"Tcl error executing pg_exec create database <dbName>
is not a valid postgresql connection"
If I try to open a database I created in psql, I get the following error
message:
"Error trying to connect to database '<dbName>' on host localhost
PostgreSQL error message:Connection to database failed
PQconnectPoll() -- connect() failed: Connection Refused
Is the postmaster running (with -i) at 'localhost' and accepting
connections on TCP/IP port '5432'?"
What do I need to do to be able to use pgaccess? Looking through the
'/etc/rc.d/init.d/postgres' script, I don't see the -i or the port set
anywhere. Am I looking in the right place?
>>
Theo,
You're in the right place, but you have to do some "magic" to get it to work
at this point. It astounds me that Mandrake doesn't do this for us (or
provide a nice GUI for doing it ourselves), but you actually have to add the
-i option to the postres script. Unfortunately, its not that easy.
Madrake calls pg_ctl to actually start postgres. It passes
/usr/bin/postmaster as an arguement. One of the options to pass to pg_ctl
are the options to pass to /usr/bin/postmaster (lost yet?). That option is
-o. In that option is where you want to pass the -i.
Since I've confused myself, here's my line from /etc/rc.d/init.d/postgres
(line 83)
su -l postgres -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster -o '-i'
start >/dev/null 2>&1"
yips!
At that point, I was able to go in and create databases and view them from
pgaccess. It sounds like you've got that step down already.
Good luck
David