[pgsql-jp: 36372] PostgreSQLのスタート

Katumi Miyao kattyan @ nakayosi.jp
2005年 11月 12日 (土) 09:21:11 JST


御世話になっております。宮尾です
PostgreSQL-8.0.4のスタートでフリーズしたり設定がうまくいってないのか、
起動時にエラーが出ます。
どこの設定を変更すればよろしいのでしょうか?
[postgres @ himawari pgsql]$ vi /home/postgres/.bashrc
# 下記を追加 #
LD_LIBRARY_PATH=/usr/local/pgsql/lib
export LD_LIBRARY_PATH
[postgres @ himawari pgsql]$ vi /home/postgres/.bash_profile
# 下記を追加 #
PG=/usr/local/pgsql
export PATH=$PATH:$PG/bin
export MANPATH=$MANPATH:$PG/man
export PGLIB=$PG/lib
export PGDATA=$PG/data
[postgres @ himawari pgsql]$ /usr/local/pgsql/bin/initdb -E EUC-JP --no-locale -D /usr/local/pgsql/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
省略
Success. You can now start the database server using:

    /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
or
    /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start

[postgres @ himawari pgsql]$ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
LOG:  database system was shut down at 2005-11-12 08:24:14 JST
LOG:  checkpoint record is at 0/A38A70
LOG:  redo record is at 0/A38A70; undo record is at 0/0; shutdown TRUE
LOG:  next transaction ID: 544; next OID: 17230
LOG:  database system is ready
フリーズしました!!!
[postgres @ himawari pgsql]$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
pg_ctl: another postmaster may be running; trying to start postmaster anyway
sh: line 1: logfile: 許可がありません
pg_ctl: could not start postmaster
Examine the log output.
[postgres @ himawari pgsql]$ exit
[root @ himawari root]# ps -ax
  PID TTY      STAT   TIME COMMAND
1331 ?        S      0:00 su postgres
 1332 ?        S      0:00 bash
 1335 ?        S      0:00 /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
 1337 ?        S      0:00 postgres: writer process
 1338 ?        S      0:00 postgres: stats buffer process
 1339 ?        S      0:00 postgres: stats collector process


また、Linux起動時にサービスを自動起動したいのですが、/etc/rc.d/rc.localに
どのように書き加えればよろしいのでしょうか。

ご教授下さい



pgsql-jp メーリングリストの案内