[pgcluster: 92] クラスタサーバ起動時にpostgres.coreを生成

木下 歩 kinoshita @ elflow.com
2004年 2月 18日 (水) 17:10:42 JST


はじめまして、木下と申します。
以前、pgsql-jpのメーリングリストで
質問しアドバイスをいただいた後、再度
チャレンジしたのですが、やはり解決できませんでした。
(かなり時間が経過して今しましたが。。)

現象としては、クラスタサーバの起動コマンドを下記のように入力後、
$ /usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data -o "-i"
postmaster successfully started
と表示されますが、カレントディレクトリにpostgres.coreが生成され、
起動できません。

下記に環境、手順を記しますが、足らずの情報などありましたら
よろしくお願いします。

木下 歩

●環境
ローカルネットワーク(10.1.1.0)内にクラスタサーバ2台、
レプリケーションサーバ1台を構築しました。

・クラスタサーバ(cl01.test.com 10.1.1.201 cl02.test.com 10.1.1.202)
FreeBSD 4.7RELEASE
openssl-0.9.7c
openssh-3.7.1p2
rsync2.5.7
pgcluster-1.0.6

・レプリケーションサーバ兼DNSサーバ(rep.test.com 10.1.1.203)
RedhatLinux 8.0
openssl-0.9.7c
pgcluster-1.0.6
bind-9.2.2

●主な設定内容(作業はpgsqlユーザを作成して行ないました。)
・クラスタサーバ(フルパッケージ版でインストールしました。)
cluster.confの設定
<Replicate_Server_Info>
  <Host_Name> rep.test.com </Host_Name>
  <Port> 8777 </Port>
  <Recovery_Port> 7778 </Recovery_Port>
</Replicate_Server_Info>
<Recovery_Port> 7779 </Recovery_Port>
<Rsync_Path> /usr/local/bin/rsync </Rsync_Path>
<Rsync_Option> /usr/local/bin/ssh -1 </Rsync_Option>
<When_Stand_Alone> read_only </When_Stand_Alone>

・レプリケーションサーバ(フルパッケージ版でインストールしました。)
pgreplicate.confの設定
<Cluster_Server_Info>
<Host_Name> cl01.test.com </Host_Name>
<Port> 5432 </Port>
<Recovery_Port> 7779 </Recovery_Port>
</Cluster_Server_Info>

<Cluster_Server_Info>
<Host_Name> cl02.test.com </Host_Name>
<Port> 5432 </Port>
<Recovery_Port> 7779 </Recovery_Port>
</Cluster_Server_Info>

<Replication_Port> 8777 </Replication_Port>
<Recovery_Port> 7778 </Recovery_Port>

・各サーバ共通の設定
コンフィグのオプション
$
./configure --enable-multibyte=EUC_JP --without-zlib  --enable-syslog --with
out-readline
データベースの初期化
$ initdb --no-locale --encoding=EUC_JP

pg_hba.confの設定変更
local   all         all                                             trust
host    all         all         127.0.0.1         255.255.255.255   trust
host    all         all         10.1.1.0         255.255.255.0   trust

postgresql.confの設定変更
tcpip_socket = true

パスの設定変更
/home/pgsql/.cshrcを変更
set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
/usr/local/bin /usr/X11R6/bin /usr/local/pgsql/bin)
setenv  LANG    ja_JP.EUC
setenv PGDATA /usr/local/pgsql/data
setenv PGLIB /usr/local/pgsql/lib
setenv PGDATA /usr/local/pgsql/data
setenv LD_LIBRARY_PATH /usr/local/pgsql/lib

/etc/hostsの設定
cl01.test.com
127.0.0.1               localhost.test.com localhost
10.1.1.201              cl01.test.com cl01
10.1.1.201              cl01.test.com.

cl02.test.com
127.0.0.1               localhost.test.com localhost
10.1.1.202              cl02.test.com cl02
10.1.1.202              cl02.test.com.

rep.test.com
127.0.0.1               rep.test.com rep localhost.localdomain localhost

また、クラスタサーバ間ではRSA認証の秘密鍵と公開鍵の作成し、
パスワードを入力せず、RSA認証のみの認証にする設定にし、
rsyncの動作確認も行ないました。

●起動手順
・レプリケーションサーバの起動
(1)$ pg_ctl start
(2)$ /usr/local/pgsql/bin/pgreplicate -D /usr/local/pgsql/etc
・クラスタサーバの起動
(3)$ /usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data -o "-i"

長くなってしまいましたがよろしくお願いいたします。







pgcluster メーリングリストの案内