[pgcluster: 973] Re: レプリケーション時のエラー ??= ?ISO-2022-JP?B?GyRCJWElQyU7ITwlOCRLJEQkJCRGGyhC?=
Ikuko Suyama
I.Suyama @ cec-ltd.co.jp
2007年 4月 4日 (水) 10:40:31 JST
お世話になります。
すやまです。
回答ありがとうございます。
他のマシンで実行してみたところ、確かに表示されませんでした。
ますます気になる内容の回答ですので、確認してみます。
一応、マシンをかえて、運用を始めたのですが、
運用方法が悪いのか、また、気になることがあります。
ご相談させてください。
顧客向けサービスを稼動しつつ、2000万レコードの顧客データを
DBに投入する必要があったため、
環境構築時に、マスターサーバをスタンドアローンモード(read_write)で
動作させました。
その後、2000万レコードのデータ挿入が完了したため、
マスターサーバをレプリケーションサーバ+クラスタサーバとして起動し、
スレーブサーバをクラスタサーバとして起動しました。
そこで、スレーブサーバでリカバリモードを実行すると、
$PGDATA内のbase, global などのフォルダがpostmasterの
プロセスIDが付与された形で増えてしまいました。
たとえば、
postmasterのプロセス番号が2897だとすると、
base_2897, global_2897 といった感じです。
レコード数を確認したところ、マスター側の情報がちゃんと反映されていました。
また、2度リカバリ処理を実行しても、差分ではなく、
全部の情報を復旧(rsync)しているように見えます。
このようなプロセス付きのフォルダは削除してもよいのでしょうか?
お忙しいところ、お手数をお掛けして申し訳ございませんが、
よろしくお願いいたします。
以上です。
----- Original Message -----
From: <a.mitani @ sra-europe.com>
To: "PGCluster メーリングリスト" <pgcluster @ ml.postgresql.jp>
Sent: Saturday, March 31, 2007 6:51 PM
Subject: [pgcluster: 972] Re: レプリケーション時のエラー ??=
?ISO-2022-JP?B?GyRCJWElQyU7ITwlOCRLJEQkJCRGGyhC?=
> このエラーメッセージは、チェックポイント時に
> ファイルのデータをハードディスクに書き出す際に
> 何らかのエラーが発生した場合に書かれます。
>
> ハードディスク上でブロックエラーが発生している可能性がありますので、
> ディスクをチェックしてみてください。
> 場合によってはディスクを交換された方がよいかもしれません。
>
> 三谷@オランダ
>
>
>> お世話になります。
>> すやまです。
>>
>> 先ほどのメールに引き続き、度々申し訳ありません。
>> pgcluster-1.3.1rc7 でシーケンス番号のレプリケーション検証を
>> 行っています。
>> メッセージについて、1件確認させてください。
>>
>> リカバリ処理中に、レプリケーションサーバから
>> 以下のメッセージが表示され、
>> ERRORなのか、正常なのか判断できずに困っています。
>> レプリケーション自体はうまくいっているようなので、
>> 問題なしと判断したいのですが、大丈夫でしょうか?
>>
>> 「ERROR: storage sync failed on magnetic disk: 成功です」
>>
>>
>> マシン2台(host_a, host_b) 構成で実施しています。
>> それぞれのマシンには、DBクラスタとpgreplicateを起動させています。
>> host_aをマスタとしています。
>>
>> 以下、それぞれのマシンの定義情報になります。
>>
>> ■pg_hba.conf(host_a, host_bともに同じ)
>> # TYPE DATABASE USER CIDR-ADDRESS METHOD
>> host test postgres xxx.xxx.xxx.0 255.255.255.0 trust
>> host template1 postgres host_aのIPアドレス 255.255.255.255
>> trust
>> host template1 postgres host_bのIPアドレス 255.255.255.255
>> trust
>>
>> # "local" is for Unix domain socket connections only
>> local all all trust
>> # IPv4 local connections:
>> host all all 127.0.0.1/32 trust
>> host all all xxx.xxx.xxx/24 trust
>> # IPv6 local connections:
>> host all all ::1/128 trust
>>
>> ■postgresql.conf( host_a, host_b ともに同じ)
>> 変更は以下のみ。
>> listen_addresses = '*'
>> #listen_addresses = 'localhost' # what IP interface(s) to listen on;
>> # defaults to localhost, '*' = any
>> port = 5432
>> #port = 5432
>>
>>
>> ■cluster.conf
>>
>> host_a↓
>> <Replicate_Server_Info>
>> <Host_Name> host_a </Host_Name>
>> <Port> 8001 </Port>
>> <Recovery_Port> 8101 </Recovery_Port>
>> </Replicate_Server_Info>
>> <Replicate_Server_Info>
>> <Host_Name> host_b </Host_Name>
>> <Port> 8002 </Port>
>> <Recovery_Port> 8102 </Recovery_Port>
>> </Replicate_Server_Info>
>> #<Replicate_Server_Info>
>> # <Host_Name> replicate3.postgres.jp </Host_Name>
>> # <Port> 8003 </Port>
>> # <Recovery_Port> 8103 </Recovery_Port>
>> #</Replicate_Server_Info>
>> #-------------------------------------------------------------
>> # set Cluster DB Server information
>> # o Recovery_Port : connection for recovery
>> # o Rsync_Path : path of rsync command
>> # o Rsync_Option : file transfer option for rsync
>> # o Rsync_Compress : use compression option for rsync
>> # [yes/no]. default : yes
>> # o Pg_Dump_Path : path of pg_dump
>> # o When_Stand_Alone : When all replication servers fell,
>> # you can set up two kinds of permittion,
>> # "real_only" or "read_write".
>> #-------------------------------------------------------------
>> <Recovery_Port> 7001 </Recovery_Port>
>> <Rsync_Path> /usr/bin/rsync </Rsync_Path>
>> <Rsync_Option> ssh -1 </Rsync_Option>
>> <Rsync_Compress> yes </Rsync_Compress>
>> <Pg_Dump_Path> /usr/local/pgsql/bin/pg_dump </Pg_Dump_Path>
>> <When_Stand_Alone> read_only </When_Stand_Alone>
>> #-------------------------------------------------------------
>> # set partitional replicate control information
>> # set DB name and Table name to stop reprication
>> # o DB_Name : DB name
>> # o Table_Name : table name
>> #-------------------------------------------------------------
>> #<Not_Replicate_Info>
>> # <DB_Name> test_db </DB_Name>
>> # <Table_Name> log_table </Table_Name>
>> #</Not_Replicate_Info>
>>
>> host_b↓
>> <Replicate_Server_Info>
>> <Host_Name> host_a </Host_Name>
>> <Port> 8001 </Port>
>> <Recovery_Port> 8101 </Recovery_Port>
>> </Replicate_Server_Info>
>> <Replicate_Server_Info>
>> <Host_Name> host_b </Host_Name>
>> <Port> 8002 </Port>
>> <Recovery_Port> 8102 </Recovery_Port>
>> </Replicate_Server_Info>
>> #<Replicate_Server_Info>
>> # <Host_Name> replicate3.postgres.jp </Host_Name>
>> # <Port> 8003 </Port>
>> # <Recovery_Port> 8103 </Recovery_Port>
>> #</Replicate_Server_Info>
>> #-------------------------------------------------------------
>> # set Cluster DB Server information
>> # o Recovery_Port : connection for recovery
>> # o Rsync_Path : path of rsync command
>> # o Rsync_Option : file transfer option for rsync
>> # o Rsync_Compress : use compression option for rsync
>> # [yes/no]. default : yes
>> # o Pg_Dump_Path : path of pg_dump
>> # o When_Stand_Alone : When all replication servers fell,
>> # you can set up two kinds of permittion,
>> # "real_only" or "read_write".
>> #-------------------------------------------------------------
>> <Recovery_Port> 7001 </Recovery_Port>
>> <Rsync_Path> /usr/bin/rsync </Rsync_Path>
>> <Rsync_Option> ssh -1 </Rsync_Option>
>> <Rsync_Compress> yes </Rsync_Compress>
>> <Pg_Dump_Path> /usr/local/pgsql/bin/pg_dump </Pg_Dump_Path>
>> <When_Stand_Alone> read_only </When_Stand_Alone>
>> #-------------------------------------------------------------
>> # set partitional replicate control information
>> # set DB name and Table name to stop reprication
>> # o DB_Name : DB name
>> # o Table_Name : table name
>> #-------------------------------------------------------------
>> #<Not_Replicate_Info>
>> # <DB_Name> test_db </DB_Name>
>> # <Table_Name> log_table </Table_Name>
>> #</Not_Replicate_Info>
>>
>>
>> ■ pgreplicate.conf
>>
>> host_a↓
>> <Cluster_Server_Info>
>> <Host_Name> host_a </Host_Name>
>> <Port> 5432 </Port>
>> <Recovery_Port> 7001 </Recovery_Port>
>> </Cluster_Server_Info>
>> <Cluster_Server_Info>
>> <Host_Name> host_b </Host_Name>
>> <Port> 5432 </Port>
>> <Recovery_Port> 7001 </Recovery_Port>
>> </Cluster_Server_Info>
>> #<Cluster_Server_Info>
>> # <Host_Name> cluster3.postgres.jp </Host_Name>
>> # <Port> 5432 </Port>
>> # <Recovery_Port> 7001 </Recovery_Port>
>> #</Cluster_Server_Info>
>> #
>> #-------------------------------------------------------------
>> # A setup of Load Balance Server
>> #
>> # o Host_Name : The host name of a load balance server.
>> # -- please write a host name by FQDN or IP
>> addr
>> ess.
>> # o Recovery_Port : The connection port at the time of
>> # a recovery sequence .
>> #-------------------------------------------------------------
>> <<略>>すべてコメント
>> #
>> <Host_Name> host_a </Host_Name>
>> <Replication_Port> 8001 </Replication_Port>
>> <Recovery_Port> 8101 </Recovery_Port>
>> <RLOG_Port> 8301 </RLOG_Port>
>> <Response_Mode> normal </Response_Mode>
>> <Use_Replication_Log> no </Use_Replication_Log>
>>
>>
>> host_b↓
>> <Cluster_Server_Info>
>> <Host_Name> host_a </Host_Name>
>> <Port> 5432 </Port>
>> <Recovery_Port> 7001 </Recovery_Port>
>> </Cluster_Server_Info>
>> <Cluster_Server_Info>
>> <Host_Name> host_b </Host_Name>
>> <Port> 5432 </Port>
>> <Recovery_Port> 7001 </Recovery_Port>
>> </Cluster_Server_Info>
>> #<Cluster_Server_Info>
>> # <Host_Name> cluster3.postgres.jp </Host_Name>
>> # <Port> 5432 </Port>
>> # <Recovery_Port> 7001 </Recovery_Port>
>> #</Cluster_Server_Info>
>> #
>> <<略>>すべてコメント
>> #
>> <Host_Name> host_a </Host_Name>
>> <Replication_Port> 8001 </Replication_Port>
>> <Recovery_Port> 8101 </Recovery_Port>
>> <RLOG_Port> 8301 </RLOG_Port>
>> <Response_Mode> normal </Response_Mode>
>> <Use_Replication_Log> no </Use_Replication_Log>
>>
>>
>> よろしくお願いします。
>> 以上です。
>>
>> ...................................................................................................
>> Ikuko Suyama
>> Open Source Solutions Div. IT Solutions Group.
>> Computer Engineering & Consulting, Ltd.
>> E-mail: I.Suyama @ cec-ltd.co.jp Phone : 03-5789-2477 (570)
>> Open Source Expert http://www.oss-expert.com/
>>
>
pgcluster メーリングリストの案内