Dear PT3 users,
herewith I would like to advise you, how to get Postgresql 9.0.4 worked on new Mac OS Lion.
First of all I confirm that if you just upgraded your Snow Leopard 10.6 to Lion 10.7, as PT3 as Postgresql work properly.
If you have reformatted you HD and made a clean install of Mac OS Lion, you will not be able to install Postgresql on it.
Up to now there is no working install of Postgresql world wide.
The solution from Kraada : viewtopic.php?f=15&t=35441 does not work.
I have lost three days in order to get it worked.
Here is the Solution:
Problem running post-install step. Installation may not complete correctly
The database cluster initialisation failed.
I looked into /Library/PostgreSQL/9.0 and everything seems to be there except the data directory. So open up System Preferences > Users & Groups and add a user postgres. Then as root:
cd /Library/PostgreSQL/9.0
mkdir data
chmod 700 data
chown postgres data
su postgres
./bin/initdb /Library/PostgreSQL/9.0/data
(Watch it go and then you can start your server via)
./bin/postgres -D /Library/PostgreSQL/9.0/data
or
./bin/pg_ctl start -D /Library/PostgreSQL/9.0/data/ (for daemon mode, pg_ctl --help has a full list of commands)
Now in a new tab try /Library/PostgreSQL/9.0/bin/psql -U postgres and all should connect.
After doing the above-mentioned steps you can start PT3 and connect to the Server as usual.
One word of warning. If you are using just psql without the full path it will load the default Lion psql command and you'll get this error:
dyld: Library not loaded: /usr/lib/libpq.5.dylib
Referenced from: /usr/bin/psql
Reason: no suitable image found. Did find:
/usr/lib/libpq.5.dylib: no matching architecture in universal wrapper
/usr/lib/libpq.5.dylib: no matching architecture in universal wrapper
Trace/BPT trap: 5
So make sure when launching psql that you include full path to the installation directory.