Forum OpenACS Q&A: Problems with postgres installation

Collapse
Posted by mark rohn on
I've installed Postgres 7.0.2 using the "Simple PostgreSQL
Install Guide". So far it has installed perfectly and even runs when
the postmaster is started up. Every time I try to create a database I
get the following error.
FATAL 1: database "mydb" does not exist in the system catalog.

HELP
Thanks
Mark

Collapse
Posted by Roberto Mello on
Oooops !! I just noticed that I forgot the step where you have to do a "/usr/local/pgsql/bin/initdb". I really apologize for this... I totally spaced here.

Bring postmaster down, do an initdb, start postmaster again and then try your createdb and it should work.

We will be releasing another version of the docs with these quirks fixed in the upcoming OpenACS 3.2.4 that should be released this or next week.

Collapse
Posted by Roberto Mello on
If you could submit this bug at the SDM, that would be great.
Collapse
Posted by mark rohn on
Ok I've tried running "/usr/local/pgsql/bin/initdb", but this command is in your instructions above the command to run the postmaster. Anyway I still have the same problem but now every time I type the command "psql" I get the following error.

FATAL 1: Database "postgres" does not exist in the system catalog

Collapse
Posted by Roberto Mello on
You get the "database postgres does not exist" error because you're calling psql by itself. Let me be more detailed... I was in a hurry when I posted the last response:

(assumming your data will reside in /usr/local/psql/data). Stop postmaster before doing this.

(as user postgres)

/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postmaster -S -D /usr/local/pgsql/data
createuser youruser

su - youruser
createdb yourdb
psql mydb

Where 'youruser' is the user AOLserver will connect to PG and 'mydb' is the name you're giving to the database.

Sorry about this mistake in the documentation.

Collapse
Posted by mark rohn on
That for your quick response and help. I've found the problem and it's "ME". Thanks again for your help and quick response.

Regards

Mark

Collapse
Posted by arief zj on
Hello...I donno what's wrong with my installation, when i logged as nsadmin (AOLserver user), i cannot use/access createdb,psql command although i've already added it as postgres user(using createuser). Is it bcoz of my postgres driver ???
Collapse
Posted by Don Baccus on
It sounds like you don't have your environment variables set up correctly - have you added /usr/local/pgsql/bin to your PATH, for instance?
Collapse
Posted by arief zj on
I've added that line in the /etc/profile file ...i followed the simple installation guide by roberto mello...the rest of the line are:
PATH=$PATH:/usr/local/pgsql/bin
MANPATH=$MANPATH:/usr/local/pgsql/man
export MANPATH
is it like that???
Collapse
Posted by Don Baccus on
You need to export PATH too...
Collapse
Posted by arief zj on
actually....i already did export the PATH too..i used this line:
export PATH MANPATH
hehe... did i miss something???
Collapse
Posted by arief zj on
thanx to all, no more problemo, reinstall back, works fine
Collapse
Posted by arief zj on
Hi .. its me again, i've already installed all those stuff (openACS+POstgres+AOL) and it works. :))
But, when i used psql, i cannot 'scroll up/down' my previous command or even pressing TAB key to obtain the tables name or SQL command easily. I've used psql before on other machine and they have this functionality. I donno whether you understand or not my problem here bcoz i'm new in this linux stuff too.
So..anyone can help me to figure out this?....or Did i missed something...AGAIN?? :))
Collapse
Posted by Robert Gaszewski on
You should install readline library and recompile PostgreSQL.