But when install PostgreSQL 8.4.18 it thrown an error:
Problem running post-install step.
Installation may not complete correctly
The database cluster initialization failed.
Looked into the /tmp/bitrock_installer.log, there's an error:
Preparing to Install
Executing su - postgres -c "\"/Library/PostgreSQL/9.1/bin/pg_ctl\" stop -m fast -w -D \"/Library/PostgreSQL/9.1/data\""
Script exit code: 1
su: unknown login: postgres
That's weird why it didn't create necessary account.
So I tried to create the postgres user:
# sudo dscl . -create /users/postgres
Then checked it:
# id postgres
id: postgres: no such user
After google around, they said on Lion, the user _postgres has been precreated and PostgreSQL 9 installed.
So let's delete it:
# sudo dscl . -delete /Users/_postgres