Search
Translations of this page:

Initiating PostgreSQL

PostgreSQL doesn't come initiated or enabled out of the box on Facebook Accelerators. If you want to use PostgreSQL, you need to initiate it first (execute under 'sudo'):

mkdir /opt/local/pgsql
chown postgres:postgres /opt/local/pgsql
usermod -d /opt/local/pgsql postgres
su - postgres
/opt/local/bin/initdb --pgdata=/opt/local/pgsql/data --encoding=UTF8 --locale=en_US.UTF-8 --auth=password --pwpromp

To start PostgreSQL and keep it running, use the SMF profile that's already on the system:

svcadm enable postgresql

Getting it to work

After doing all this, postgres dropped to maintenance state in svcs. I turned out it couldn's create /var/log/postgresql.log. To solve:

touch /var/log/postgresql.log
chown postgres /var/log/postgresql.log
svcadm clear postgresql
 
facebook/kb/init-postgresql.txt · Last modified: 2007/12/17 14:19 by koen
 
Recent changes RSS feed Creative Commons License Driven by DokuWiki