postmaster の起動
起動は postgres のような、データべースに書ける権限で行ないます。
また root ではだめです。
makoto@u 16:04:10/020201(~)> /usr/pkg/bin/pg_ctl -D /tmp/pglib -l logfile start
postmaster successfully started
logfile には
DEBUG: database system was shut down at 2002-02-01 16:04:10 JST
DEBUG: CheckPoint record at (0, 1563248)
DEBUG: Redo record at (0, 1563248); Undo record at (0, 0); Shutdown TRUE
DEBUG: NextTransactionId: 615; NextOid: 18720
DEBUG: database system is in production state
また別の日: (postgres で login しておいて)
postgres@u 11:44:03/020215(/var/log)> /usr/pkg/bin/pg_ctl -D /a/j/postgres start
postmaster successfully started
postgres@u 11:44:14/020215(/var/log)>
IpcMemoryCreate: shmget(key=5432001, size=1245184, 03600) failed: Cannot allocate memory
postgres@u 11:47:04/020215(/var/log)> pg_ctl -D /a/j/postgres status
pg_ctl: postmaster or postgres is not running
http://archives.postgresql.org/pgsql-general/2001-06/msg01313.php
そこで
-#options SHMMAXPGS=1024 # 1024 pages is the default
+options SHMMAXPGS=2048 # 2048 pages is the default
でカーネルを作り直してから、
postgres@u 21:53:51/020226(/var/log)> /usr/pkg/bin/pg_ctl -D /a/j/postgres start
postmaster successfully started
postgres@u 21:54:05/020226(/var/log)>
postgres@u 21:54:05/020226(/var/log)> DEBUG: database system was shut down at 2002-02-15 11:40:32 JST
DEBUG: CheckPoint record at (0, 1563248)
DEBUG: Redo record at (0, 1563248); Undo record at (0, 0); Shutdown TRUE
DEBUG: NextTransactionId: 615; NextOid: 18720
DEBUG: database system is in production state
postgres@u 21:54:05/020226(/var/log)>
これで大丈夫。
|