[pgcluster: 385] Re: now()の誤動作(pgcluster-1.0.7rc7にて)
Nishino
nishino @ imp.zive.net
2004年 6月 23日 (水) 12:18:12 JST
西野です。
先日、now()の誤動作を報告した者です。
最新の pgcluster-1.0.7rc7 にて検証を行ってみましたが、
now() を受け付けたクラスタのみが、他のクラスタと揃わない時間を
取得しておりました。
以上、ご報告まで。
> 西野と申します。
> 今回、妙な症状が起きてしまうのでご連絡いたします。
>
>
> PGCluster-1.0.7RC3フルパッケージ版を以下の構成に用意しました。
> (マシンはすべてredhat8)
>
> lb 192.168.2.80 ロードバランサ
> ct1 192.168.2.81 クラスタ1
> ct2 192.168.2.82 クラスタ2
> ct3 192.168.2.83 クラスタ3
> rp 192.168.2.84 リプリケータ
> test 192.168.2.90 検証マシン
>
>
>
> 以下、試験手順。
> テーブル構成
> postgres=> \d sample
> Table "public.sample"
> Column | Type | Modifiers
> ------------+-----------------------------+-----------
> dataintime | timestamp without time zone |
> id | integer |
>
>
>
> (1). test → lb
> postgres=> INSERT INTO sample VALUES (now(), 1);
> INSERT 17011 1
> postgres=> INSERT INTO sample VALUES (now(), 2);
> INSERT 17012 1
> postgres=> INSERT INTO sample VALUES (now(), 3);
> INSERT 17013 1
> postgres=> INSERT INTO sample VALUES (now(), 4);
> INSERT 17014 1
> postgres=> INSERT INTO sample VALUES (now(), 5);
> INSERT 17015 1
> postgres=> INSERT INTO sample VALUES (now(), 6);
> INSERT 17016 1
> postgres=> INSERT INTO sample VALUES (now(), 7);
> INSERT 17017 1
> postgres=> INSERT INTO sample VALUES (now(), 8);
> INSERT 17018 1
> postgres=> INSERT INTO sample VALUES (now(), 9);
> INSERT 17019 1
>
> (2). ct1
> postgres=# SELECT * from sample order by id;
> dataintime | id
> ----------------------------+----
> 2004-06-11 14:58:30.731321 | 1 <---- ※
> 2004-06-11 14:58:32.537703 | 2
> 2004-06-11 14:58:33.491437 | 3
> 2004-06-11 14:58:34.45971 | 4
> 2004-06-11 14:58:35.338717 | 5
> 2004-06-11 14:58:36.234054 | 6
> 2004-06-11 14:58:37.309674 | 7
> 2004-06-11 14:58:38.299904 | 8
> 2004-06-11 14:58:39.235818 | 9
> (9 rows)
>
>
> (3). ct2
> postgres=# SELECT * from sample order by id;
> dataintime | id
> ----------------------------+----
> 2004-06-11 14:58:25.809607 | 1 <---- ※
> 2004-06-11 14:58:30.731321 | 2
> 2004-06-11 14:58:32.537703 | 3
> 2004-06-11 14:58:33.491437 | 4
> 2004-06-11 14:58:34.45971 | 5
> 2004-06-11 14:58:35.338717 | 6
> 2004-06-11 14:58:36.234054 | 7
> 2004-06-11 14:58:37.309674 | 8
> 2004-06-11 14:58:38.299904 | 9
> (9 rows)
>
>
> (4). ct3
> postgres=# SELECT * from sample order by id;
> dataintime | id
> ----------------------------+----
> 2004-06-11 14:58:30.731321 | 1 <---- ※
> 2004-06-11 14:58:32.537703 | 2
> 2004-06-11 14:58:33.491437 | 3
> 2004-06-11 14:58:34.45971 | 4
> 2004-06-11 14:58:35.338717 | 5
> 2004-06-11 14:58:36.234054 | 6
> 2004-06-11 14:58:37.309674 | 7
> 2004-06-11 14:58:38.299904 | 8
> 2004-06-11 14:58:39.235818 | 9
> (9 rows)
>
>
>
> ここで確認して頂きたいのが、ct1 = ct 3 で同期が取れているのに、
> ct2 が違う値を insert されてしまっているところです。
>
> データの件数はそれぞれ 9件ずつ なので問題なさそうですが now()
> 命令を使用する事で、同期の取れない結果になっているようです。
>
> (単純に now() を使用しなければ・・・)
>
>
>
> now() はリプリケータの時間を取得してそれぞれのクラスタに
> 代入していると見受けますが、このような症状はありましたでしょうか?
>
>
> 宜しくお願いいたします。
>
>
>
----
Nishino < nishino @ imp.zive.net >
pgcluster メーリングリストの案内