Installation woes via Macports on Mac OS X 10.7 - Mailing list pgsql-general

From René Fournier
Subject Installation woes via Macports on Mac OS X 10.7
Date
Msg-id 42DF0149-B56F-402C-8763-364CC674E879@gmail.com
Whole thread Raw
Responses Re: Installation woes via Macports on Mac OS X 10.7  (Scott Ribe <scott_ribe@elevated-dev.com>)
Re: Installation woes via Macports on Mac OS X 10.7  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I've tried installation 8.4 and 9.0 on two different machines, and at the end can't start Postgresql. Here's the basic story:

[…]
--->  Building postgresql90-server
--->  Staging postgresql90-server into destroot
--->  Creating launchd control script
###########################################################
# A startup item has been generated that will aid in
# starting postgresql90-server with launchd. It is disabled
# by default. Execute the following command to start it,
# and to cause it to launch at startup:
#
# sudo port load postgresql90-server
###########################################################
--->  Installing postgresql90-server @9.0.5_0

To create a database instance, after install do
 sudo mkdir -p /opt/local/var/db/postgresql90/defaultdb
 sudo chown postgres:postgres /opt/local/var/db/postgresql90/defaultdb
 sudo su postgres -c '/opt/local/lib/postgresql90/bin/initdb -D /opt/local/var/db/postgresql90/defaultdb'

To tweak your DBMS, consider increasing kern.sysv.shmmax by adding an increased kern.sysv.shmmax .. to /etc/sysctl.conf
--->  Activating postgresql90-server @9.0.5_0
--->  Cleaning postgresql90-server
Fri Oct 07 11:24:33 -- Baby-Irmo :: sudo port load postgresql90-server
Password:
Fri Oct 07 14:13:34 -- Baby-Irmo :: sudo mkdir -p /opt/local/var/db/postgresql90/defaultdb
Fri Oct 07 14:13:40 -- Baby-Irmo ::  sudo chown postgres:postgres /opt/local/var/db/postgresql90/defaultdb
Fri Oct 07 14:13:41 -- Baby-Irmo :: sudo vi /etc/sysctl.conf
Fri Oct 07 14:15:46 -- Baby-Irmo :: sudo sysctl -w kern.sysv.shmall=65536
kern.sysv.shmall: 1024 -> 65536
Fri Oct 07 14:15:50 -- Baby-Irmo :: sudo sysctl -w kern.sysv.shmmax=16777216
kern.sysv.shmmax: 4194304 -> 16777216
Fri Oct 07 14:15:52 -- Baby-Irmo :: sudo su postgres -c '/opt/local/lib/postgresql90/bin/initdb -D /opt/local/var/db/postgresql90/defaultdb'
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale en_CA.UTF-8.
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to "english".

fixing permissions on existing directory /opt/local/var/db/postgresql90/defaultdb ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 12MB
creating configuration files ... ok
creating template1 database in /opt/local/var/db/postgresql90/defaultdb/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

    /opt/local/lib/postgresql90/bin/postgres -D /opt/local/var/db/postgresql90/defaultdb
or
    /opt/local/lib/postgresql90/bin/pg_ctl -D /opt/local/var/db/postgresql90/defaultdb -l logfile start

Fri Oct 07 14:17:58 -- Baby-Irmo :: /opt/local/lib/postgresql90/bin/postgres -D /opt/local/var/db/postgresql90/defaultdb
Fri Oct 07 14:18:04 -- Baby-Irmo :: /opt/local/lib/postgresql90/bin/psql -U postgres
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Fri Oct 07 14:18:20 -- Baby-Irmo :: ps -ax | grep "postgres"
   56 ??         0:08.28 /usr/bin/postgres -D /var/pgsql -c listen_addresses= -c log_connections=on -c log_directory=/Library/Logs -c log_filename=PostgreSQL.log -c log_lock_waits=on -c log_statement=ddl -c log_line_prefix=%t  -c logging_collector=on -c unix_socket_directory=/var/pgsql_socket -c unix_socket_group=_postgres -c unix_socket_permissions=0770
  226 ??         0:33.67 postgres: logger process                           
  253 ??         1:41.76 postgres: writer process                           
  254 ??         1:12.68 postgres: wal writer process                           
  255 ??         0:23.39 postgres: autovacuum launcher process                           
  256 ??         0:38.62 postgres: stats collector process                           
28695 ??         0:00.01 /opt/local/bin/daemondo --label=postgresql90-server --start-cmd /opt/local/etc/LaunchDaemons/org.macports.postgresql90-server/postgresql90-server.wrapper start ; --stop-cmd /opt/local/etc/LaunchDaemons/org.macports.postgresql90-server/postgresql90-server.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/org.macports.postgresql90-server/postgresql90-server.wrapper restart ; --pid=none
28796 ttys002    0:00.00 grep postgres
Fri Oct 07 14:21:11 -- Baby-Irmo :: /opt/local/lib/postgresql90/bin/psql -U postgres
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Fri Oct 07 14:21:31 -- Baby-Irmo :: 


Any ideas what I need to do?

…Rene


pgsql-general by date:

Previous
From: Derrick Rice
Date:
Subject: Re: Postgres 8.4: archive_timeout vs. checkpoint_timeout
Next
From: Guillaume Lelarge
Date:
Subject: Re: Connection Pooling