[pgsql-jp: 30951] PGCluster インストールしてみましたが createdb でエラーが

Yutaka n-yutaka @ mx41.tiki.ne.jp
2003年 9月 4日 (木) 22:45:49 JST


中村と申します。

PGCluster 早速インストールしてみましたが、createdb で下記のようなエラー
がでて、失敗してしまいます。

psql: server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.
createdb: database creation failed


構成は下記のように行っています。
	クラスタサーバー    2台
	レプリケーションサバー  1台
ロードバランサは使用していません。
(今回は試験なので3台とも同一LAN上にいますが、本稼働時にはクラスタサー
バーの1台はVPN経由での接続を予定しています。)
それぞれ、フォーマッティングを行い、VineLinux2.5をインストールしてから
PGClusterをインストールしています。
クラスターサーバー、レプリケーションサーバー共にinitdbまで行い、
pg_hba.conf、postgresql.confを後述のように編集しています。
レプリケーションサーバーについては、さらに
  $ cd /usr/local/src/pgcluster-1.0/src/pgcluster/pgrp
    $ ./configure
    $ make
    $ su
    # make install
としました。
その上で、PGCluster固有の設定ファイルcluster.conf、pgreplicate.confを編
集し、
レプリケーションサーバーを
	pgreplicate  (成功します)
各クラスターサーバーを
	pg_ctl start -o "-i"  (成功します)
としたうえで、クラスタサーバー(マスタDB)で
	createdb test
とすると、上記のようなエラーがでてしまいます。


設定は下記のようにしています。

1.クラスタサーバー名(マスタDB) csvhatu
  クラスタサーバー名
	  csvhiro
  レプリケーションサーバー名
    rsvhatu

2.configure
  ./configure --enable-multibyte=EUC_JP --enable-syslog

3.パス、環境変数(.bashrcに下記を追加。source ~/.bashrcを実行)
  PATH="$PATH":/usr/local/pgsql/bin
    export POSTGRES_HOME=/usr/local/pgsql
    export PGLIB=$POSTGRES_HOME/lib
    export PGDATA=$POSTGRES_HOME/data
    export MAPATH="$MANPATH":$POSTGRES_HOME/man
    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$PGLIB"

4.pg_hba.confに追加した行
    host  all   all    192.168.0.0    255.255.0.0   trust

5.postgresql.confに追加した行
    silent_mode = on
    tcpip_socket = on
    syslog = 2

(上記は石井先生のシーラカンス本の通りです。)

6./usr/local/pgsql/data/cluster.confの編集した行(PGClusterの固有ファ
イル。クラスタサーバーの2台についてだけ編集)
    <Replicate_Server_Info>
    <Host_Name> rsvhatu </Host_Name>
(サンプルのreplicate1.postgres.jpをrsvhatuに変更)

7./usr/local/pgsql/data/pgreplicate.confの編集した行(PGClusterの固有
ファイル。レプリケーションサーバーの1台についてだけ編集)
    <Cluster_Server_Info>
    <Host_Name> csvhatu </Host_Name>
    .......
    <Cluster_Server_Info>
    <Host_Name> csvhiro </Host_Name>
(サンプルのmaster.postgres.jpをcsvhatuに
      cluster1.postgres.jpをcsvhiroに
 変更して各、<Cluster_Server_Info> から </Cluster_Server_Info> まで
の#をはずしました。)


宜しくお願いいたします。




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