[pgpool-general-jp: 688] Re: WindowsPCにDBをレプリケーション

山下 恵二 yamashita @ woodpecker.co.jp
2010年 1月 29日 (金) 13:49:04 JST


山下です。

> pgpoolをLinuxで動かす前提でお答えします。
pgpoolはLinuxで動かしています。

> LinuxとWindowsでまったく同じバージョンのPostgreSQLを使い、各種設定(特
> にpg_hba.confなど)を同じにすればたぶん可能です。やってみたことはありま
> せんが...
Linuxへレプリケーションできる設定と同一の設定を参考に、
いろいろ試してみてるのですが以下のようなエラーになって
しまいます。
何か設定についてヒント等ありましたら、ご教授お願いします。

・Linux側にDBとpgpoolがあります。
・192.168.100.4 →(Windows側のIPアドレスです)
・LinuxとWindowsで、お互いにping(OK)の状態です。

<pgpool.conf>のbackend部は以下のようにしています。
〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜
backend_hostname0 = 'xxxx'
backend_port0 = 5432
backend_weight0 = 1
backend_data_directory0 = '/opt/PostgreSQL/8.4/data'

backend_hostname1 = '192.168.100.4'
backend_port1 = 5432
backend_weight1 = 1
backend_data_directory1 = 'D:/mdndb/data'
〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜

エラーメッセージは以下になります。
1)データベース作成前の nodeinfo
[root @ xxxx ~]# nodeinfo
[ID] hostname:port Status        (weight)
------------------------------------------------
[00] xxxx:5432 Disconnected (1073741823) →Linux側
[01]  192:5432 Disconnected (1073741823)  →Windows側

2)データベース作成で失敗したときのメッセージ
[root @ xxxx ~]# createdb -p 9999 -U postgres bench_replication
createdb: could not connect to database postgres: server closed the
connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
[root @ xxxx ~]#

3)pgpoolが表示しているログ
2010-01-29 12:57:52 DEBUG: pid 5005: new_connection: connecting 0 backend
2010-01-29 12:57:52 DEBUG: pid 5005: new_connection: connecting 1 backend
〜ここで2,3分待ちます

2010-01-29 13:01:01 ERROR: pid 5005: connect_inet_domain_socket:
connect() failed: Connection timed out
2010-01-29 13:01:01 ERROR: pid 5005: connection to 192.168.100.4(5432)
failed
2010-01-29 13:01:01 ERROR: pid 5005: new_connection: create_cp() failed
2010-01-29 13:01:01 LOG:   pid 5005: notice_backend_error: 1 fail over
request from pid 5005
2010-01-29 13:01:01 DEBUG: pid 4980: failover_handler called
2010-01-29 13:01:01 DEBUG: pid 4980: failover_handler: starting to
select new master node

以上よろしくお願いします。
//

Tatsuo Ishii さんは書きました:
> 石井です。
> 
>> pgpool-II 2.3.1 を業務で使用しようと思い、
>> まずテスト用サーバで環境を構築しています。
>> そこで、質問なんですが、
>>
>> pgpoolでWindowsPC(OS:XP)上にLinux上のDBを
>> レプリケーションすることは可能なんでしょうか?
> 
> pgpoolをLinuxで動かす前提でお答えします。
> 
> LinuxとWindowsでまったく同じバージョンのPostgreSQLを使い、各種設定(特
> にpg_hba.confなど)を同じにすればたぶん可能です。やってみたことはありま
> せんが...
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese: http://www.sraoss.co.jp
> 
> 



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