[pgcluster: 812] Re: 環境構築に関する質問
myoujint
myoujint @ nttdata-hokkaido.co.jp
2005年 9月 2日 (金) 16:39:24 JST
明神です。
Psqlの結果です。
[postgres @ repl etc]$ psql -l -p 5441 -h repl
List of databases
Name | Owner | Encoding
-----------+----------+----------
db1 | postgres | UNICODE
template0 | postgres | UNICODE
template1 | postgres | UNICODE(3 rows)
cluster.confは以下のようになっています。
<Replicate_Server_Info>
<Host_Name> repl </Host_Name>
<Port> 8001 </Port>
<Recovery_Port> 8101 </Recovery_Port>
<LifeCheck_Port> 8201 </LifeCheck_Port>
</Replicate_Server_Info>
#-------------------------------------------------------------
<Recovery_Port> 7101 </Recovery_Port>
<LifeCheck_Port> 7201 </LifeCheck_Port>
<Rsync_Path> /usr/bin/rsync </Rsync_Path>
<Rsync_Option> ssh -1 </Rsync_Option>
<When_Stand_Alone> read_write </When_Stand_Alone>
<Status_Log_File> /tmp/cluster.sts </Status_Log_File>
<Error_Log_File> /tmp/cluster.log </Error_Log_File>
Pgreplicate.confは以下の設定になっています。
<Cluster_Server_Info>
<Host_Name> repl </Host_Name>
<Port> 5441 </Port>
<Recovery_Port> 7101 </Recovery_Port>
<LifeCheck_Port> 7201 </LifeCheck_Port>
</Cluster_Server_Info>
<Cluster_Server_Info>
<Host_Name> repl </Host_Name>
<Port> 5443 </Port>
<Recovery_Port> 7101 </Recovery_Port>
<LifeCheck_Port> 7201 </LifeCheck_Port>
</Cluster_Server_Info>
#-------------------------------------------------------------
<Status_Log_File> /tmp/pgreplicate.sts </Status_Log_File>
<Error_Log_File> /tmp/pgreplicate.log </Error_Log_File>
<Replication_Port> 8001 </Replication_Port>
<Recovery_Port> 8101 </Recovery_Port>
<LifeCheck_Port> 8201 </LifeCheck_Port>
<RLOG_Port> 8301 </RLOG_Port>
<Response_Mode> normal </Response_Mode>
<Use_Replication_Log> no </Use_Replication_Log>
<Reserved_Connections> 1 </Reserved_Connections>
これから5443をinitdbから作成しなおしてみます。
また、三谷@オランダさんからのご指摘も修正して、ご連絡いたします。
よろしくお願いいたします。
> まさいちです。クラスタサーバは動いていますねぇ。
> createdbが正常ならpg_hba.confも問題なさそうですね。
> まして同じサーバ内の接続ですし。
>
> 以下のコマンドはどうなりますか?
> psql -l -p 5441 -h repl
>
>
> $PGDATAをコピーしたとのことでしたが、クラスタサーバは停止してからでしょう
> か。
> port=5443はinitdbしたのちに、port=5441のconfファイルをコピーした
> 方がいいと思います。
>
> レプリケーションサーバがクラスタサーバにログインできない状態なので、
> cluster.confとpgreplicate.confの設定内容を疑っています。
>
> 2005/09/02 15:16:00, "myoujint" <myoujint @ nttdata-hokkaido.co.jp> was
wrote
>
> > 明神です。
> >
> > > When_Stand_Aloneをread_writeに変更して createdb してみてください。
> >
> > これを変更して、createdbが正常に動きました。
> > これで一歩前進しました。
> > ありがとうございます。
>
> よかったですね。ただ、実際の運用では read_only にしてくださいね。
>
>
> > > まさいちです。cluster.confとpgreplicate.confの設定は一致していますよ
> ね?
> > >
> > > 2005/09/02 13:26:11, "myoujint" <myoujint @ nttdata-hokkaido.co.jp> was
> > wrote
> > >
> > > > 明神です。
> > > >
> > > > Createdbの結果は以下のようになりました。
> > > >
> > > > [postgres @ repl bin]$ createdb db1 -p 5441
> > > > createdb: database creation failed: ERROR: This query is not
permitted
> > when
> > > > all replication servers fell down
> > >
> > > レプリケーションサーバと通信できていない時のメッセージですね。
> > > When_Stand_Aloneをread_writeに変更して createdb してみてください。
> >
> >
> >
pgcluster メーリングリストの案内