昨日、Mac OS X 10.4.8 (PPC) で configure から make; make install までは無事に通った。で、initdb をしたところ、、、うまくいかない。
PGDATA='/Users/suzuki/work/postgresql/data' として、initdb を走らせたんだが、shared_memory 系でダメみたい。
$ /usr/local/pgsql/bin/initdb The files belonging to this database system will be owned by user "suzuki". This user must also own the server process. The database cluster will be initialized with locale C. fixing permissions on existing directory /Users/suzuki/work/postgresql/data ... ok creating subdirectories ... ok selecting default max_connections ... 10 selecting default shared_buffers/max_fsm_pages ... 400kB/20000 creating configuration files ... ok creating template1 database in /Users/suzuki/work/postgresql/data/base/1 ... FATAL: could not create shared memory segment: Cannot allocate memory DETAIL: Failed system call was shmget(key=1, size=1646592, 03600). HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory or swap space. To reduce the request size (currently 1646592 bytes), reduce PostgreSQL's shared_buffers parameter (currently 50) and/or its max_connections parameter (currently 10). The PostgreSQL documentation contains more information about shared memory configuration. child process exited with exit code 1 initdb: removing contents of data directory "/Users/suzuki/work/postgresql/data"
8.2 のマニュアルの「16.4.1. Shared Memory and Semaphores」に従って、/etc/sysctl.conf に次のように記述して、OSの再起動も行ってみたが、やはりinitdbでコケる。
$ cat /etc/sysctl.conf kern.sysv.shmmax=4194304 kern.sysv.shmmin=1 kern.sysv.shmmni=32 kern.sysv.shmseg=8 kern.sysv.shmall=1024
うーん。素直にLinuxで動かすか。。。
一応解決したので書いておく。 MacportsからPostgreSQL8.1.5