From: 坂田 哲夫 <sak...@la...> - 2014-03-05 06:23:05
Attachments:
pgbench_20140305.patch
|
Hi, folks, I found a pgbench bug that pgbench fails to update tables such as pgbench_accounts and pgbench_tellers. For example, original pgbench for XC tries to update pgbench_accounts' specifying aid and bid values which are selected independently. By the pgbench's nature, bid should have a particular value for a given aid value. So the update statement fails picking up target tuple and updating the table in most cases. The attached patch, which should be applied to XC 1.1s pgbench, eliminates wrongly added bid specifications and corrects index and distribute settings related. Best regards, Tetsuo Sakata. -- sakata.tetsuo _at_ lab.ntt.co.jp SAKATA, Tetsuo. Shinagawa Tokyo JAPAN. |
From: 鈴木 幸市 <ko...@in...> - 2014-03-05 06:54:41
|
Sakata-san; Thank you very much for the fix. The patch looks to be applicable to 1.0..x as well. Please let me know your thought. Regards; --- Koichi Suzuki 2014/03/05 15:23、坂田 哲夫 <sak...@la...> のメール: > Hi, folks, > > I found a pgbench bug that pgbench fails to update tables such as > pgbench_accounts and pgbench_tellers. > > For example, original pgbench for XC tries to update pgbench_accounts' > specifying aid and bid values which are selected independently. > By the pgbench's nature, bid should have a particular value for a > given aid value. So the update statement fails picking up target > tuple and updating the table in most cases. > > The attached patch, which should be applied to XC 1.1s > pgbench, eliminates wrongly added bid specifications > and corrects index and distribute settings related. > > Best regards, > > Tetsuo Sakata. > > -- > sakata.tetsuo _at_ lab.ntt.co.jp > SAKATA, Tetsuo. Shinagawa Tokyo JAPAN. > <pgbench_20140305.patch>------------------------------------------------------------------------------ > Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. > With Perforce, you get hassle-free workflows. Merge that actually works. > Faster operations. Version large binaries. Built-in WAN optimization and the > freedom to use Git, Perforce or both. Make the move to Perforce. > http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg..clktrk_______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers |
From: 坂田 哲夫 <sak...@la...> - 2014-03-05 08:35:50
Attachments:
pgbench_20140305b.patch
|
Suzuki-san, Thank you for your quick response. I quickly checked pgbench included in XC 1.0.3 to find this version does not have the problem I pointed out before. So, you don't need apply that patch to the pgbench in XC 1.0.3. ** additional correction ** The patch I posted before does not have some corrections for messages about "-k" option. Now I send a newly created patch to supersede the predecessor. Best Regards, Tetsuo Sakata. (2014/03/05 15:54), 鈴木 幸市 wrote: > Sakata-san; > > Thank you very much for the fix. The patch looks to be applicable to 1.0..x as well. Please let me know your thought. > > Regards; > --- > Koichi Suzuki > > 2014/03/05 15:23、坂田 哲夫 <sak...@la...> のメール: > >> Hi, folks, >> >> I found a pgbench bug that pgbench fails to update tables such as >> pgbench_accounts and pgbench_tellers. >> >> For example, original pgbench for XC tries to update pgbench_accounts' >> specifying aid and bid values which are selected independently. >> By the pgbench's nature, bid should have a particular value for a >> given aid value. So the update statement fails picking up target >> tuple and updating the table in most cases. >> >> The attached patch, which should be applied to XC 1.1s >> pgbench, eliminates wrongly added bid specifications >> and corrects index and distribute settings related. >> >> Best regards, >> >> Tetsuo Sakata. >> >> -- >> sakata.tetsuo _at_ lab.ntt.co.jp >> SAKATA, Tetsuo. Shinagawa Tokyo JAPAN. >> <pgbench_20140305.patch>------------------------------------------------------------------------------ >> Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. >> With Perforce, you get hassle-free workflows. Merge that actually works. >> Faster operations. Version large binaries. Built-in WAN optimization and the >> freedom to use Git, Perforce or both. Make the move to Perforce. >> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg..clktrk_______________________________________________ >> Postgres-xc-developers mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > > > ------------------------------------------------------------------------------ > Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. > With Perforce, you get hassle-free workflows. Merge that actually works. > Faster operations. Version large binaries. Built-in WAN optimization and the > freedom to use Git, Perforce or both. Make the move to Perforce. > http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > -- sakata.tetsuo _at_ lab.ntt.co.jp SAKATA, Tetsuo. Shinagawa Tokyo JAPAN. |
From: Koichi S. <koi...@gm...> - 2014-03-05 08:36:53
|
Sakata-san; I've tested the patch and found it does not apply to current master/REL1_2_STABLE branch. I also tested against REL1_1_STABLE and the result was the same. Could you check your patch against the current repo? I wonder why it happens because pgbench is very stable. Maybe it needs some tweak to deal with the current PG repo as well. Could you also consider to use the format you get with "git diff"? Thank you very much in advance. --- Koichi Suzuki 2014-03-05 15:23 GMT+09:00 坂田 哲夫 <sak...@la...>: > Hi, folks, > > I found a pgbench bug that pgbench fails to update tables such as > pgbench_accounts and pgbench_tellers. > > For example, original pgbench for XC tries to update pgbench_accounts' > specifying aid and bid values which are selected independently. > By the pgbench's nature, bid should have a particular value for a > given aid value. So the update statement fails picking up target > tuple and updating the table in most cases. > > The attached patch, which should be applied to XC 1.1s > pgbench, eliminates wrongly added bid specifications > and corrects index and distribute settings related. > > Best regards, > > Tetsuo Sakata. > > -- > sakata.tetsuo _at_ lab.ntt.co.jp > SAKATA, Tetsuo. Shinagawa Tokyo JAPAN. > > ------------------------------------------------------------------------------ > Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. > With Perforce, you get hassle-free workflows. Merge that actually works. > Faster operations. Version large binaries. Built-in WAN optimization and the > freedom to use Git, Perforce or both. Make the move to Perforce. > http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > |
From: 坂田 哲夫 <sak...@la...> - 2014-03-06 06:28:12
Attachments:
pgbench_20140305c.patch
|
Suzuki-san, Sorry for the delay, and thank you for your comments. I've made the patch I sent before for the XC 1.1.0 not REL_1_1_STABLE. So I recreated a patch for REL_1_1_STABLE. Please check the attached patch. Thanks in advance, Tetsuo Sakata. (2014/03/05 17:36), Koichi Suzuki wrote: > Sakata-san; > > I've tested the patch and found it does not apply to current > master/REL1_2_STABLE branch. I also tested against REL1_1_STABLE and > the result was the same. Could you check your patch against the > current repo? > > I wonder why it happens because pgbench is very stable. Maybe it > needs some tweak to deal with the current PG repo as well. > > Could you also consider to use the format you get with "git diff"? > > Thank you very much in advance. > --- > Koichi Suzuki > > > 2014-03-05 15:23 GMT+09:00 坂田 哲夫 <sak...@la...>: >> Hi, folks, >> >> I found a pgbench bug that pgbench fails to update tables such as >> pgbench_accounts and pgbench_tellers. >> >> For example, original pgbench for XC tries to update pgbench_accounts' >> specifying aid and bid values which are selected independently. >> By the pgbench's nature, bid should have a particular value for a >> given aid value. So the update statement fails picking up target >> tuple and updating the table in most cases. >> >> The attached patch, which should be applied to XC 1.1s >> pgbench, eliminates wrongly added bid specifications >> and corrects index and distribute settings related. >> >> Best regards, >> >> Tetsuo Sakata. >> >> -- >> sakata.tetsuo _at_ lab.ntt.co.jp >> SAKATA, Tetsuo. Shinagawa Tokyo JAPAN. >> >> ------------------------------------------------------------------------------ >> Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. >> With Perforce, you get hassle-free workflows. Merge that actually works. >> Faster operations. Version large binaries. Built-in WAN optimization and the >> freedom to use Git, Perforce or both. Make the move to Perforce. >> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk >> _______________________________________________ >> Postgres-xc-developers mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >> > > ------------------------------------------------------------------------------ > Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. > With Perforce, you get hassle-free workflows. Merge that actually works. > Faster operations. Version large binaries. Built-in WAN optimization and the > freedom to use Git, Perforce or both. Make the move to Perforce. > http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > -- sakata.tetsuo _at_ lab.ntt.co.jp SAKATA, Tetsuo. Shinagawa Tokyo JAPAN. |
From: Koichi S. <koi...@gm...> - 2014-03-06 07:14:24
|
Thank you Sakata-san; Yes, the patch was successful with REL1_1_STABLE. With some offset, it was also successful with REL1_2_STABLE and master. But failed with REL1_0_STABLE branch. Because of the nature of the fix, I think this should also go to 1.0.x. Could you further look into it? Also hope you test this fix with REL1_0_STABLE as well. Best; --- Koichi Suzuki 2014-03-06 15:28 GMT+09:00 坂田 哲夫 <sak...@la...>: > Suzuki-san, > > Sorry for the delay, and thank you for your comments. > > I've made the patch I sent before for the XC 1.1.0 not REL_1_1_STABLE. > So I recreated a patch for REL_1_1_STABLE. > > Please check the attached patch. > > Thanks in advance, > > Tetsuo Sakata. > > > > > (2014/03/05 17:36), Koichi Suzuki wrote: >> Sakata-san; >> >> I've tested the patch and found it does not apply to current >> master/REL1_2_STABLE branch. I also tested against REL1_1_STABLE and >> the result was the same. Could you check your patch against the >> current repo? >> >> I wonder why it happens because pgbench is very stable. Maybe it >> needs some tweak to deal with the current PG repo as well. >> >> Could you also consider to use the format you get with "git diff"? >> >> Thank you very much in advance. >> --- >> Koichi Suzuki >> >> >> 2014-03-05 15:23 GMT+09:00 坂田 哲夫 <sak...@la...>: >>> Hi, folks, >>> >>> I found a pgbench bug that pgbench fails to update tables such as >>> pgbench_accounts and pgbench_tellers. >>> >>> For example, original pgbench for XC tries to update pgbench_accounts' >>> specifying aid and bid values which are selected independently. >>> By the pgbench's nature, bid should have a particular value for a >>> given aid value. So the update statement fails picking up target >>> tuple and updating the table in most cases. >>> >>> The attached patch, which should be applied to XC 1.1s >>> pgbench, eliminates wrongly added bid specifications >>> and corrects index and distribute settings related. >>> >>> Best regards, >>> >>> Tetsuo Sakata. >>> >>> -- >>> sakata.tetsuo _at_ lab.ntt.co.jp >>> SAKATA, Tetsuo. Shinagawa Tokyo JAPAN. >>> >>> ------------------------------------------------------------------------------ >>> Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. >>> With Perforce, you get hassle-free workflows. Merge that actually works. >>> Faster operations. Version large binaries. Built-in WAN optimization and the >>> freedom to use Git, Perforce or both. Make the move to Perforce. >>> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Postgres-xc-developers mailing list >>> Pos...@li... >>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>> >> >> ------------------------------------------------------------------------------ >> Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. >> With Perforce, you get hassle-free workflows. Merge that actually works. >> Faster operations. Version large binaries. Built-in WAN optimization and the >> freedom to use Git, Perforce or both. Make the move to Perforce. >> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk >> _______________________________________________ >> Postgres-xc-developers mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >> > > > -- > sakata.tetsuo _at_ lab.ntt.co.jp > SAKATA, Tetsuo. Shinagawa Tokyo JAPAN. > > ------------------------------------------------------------------------------ > Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. > With Perforce, you get hassle-free workflows. Merge that actually works. > Faster operations. Version large binaries. Built-in WAN optimization and the > freedom to use Git, Perforce or both. Make the move to Perforce. > http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > |
From: 坂田 哲夫 <sak...@la...> - 2014-03-06 09:48:16
|
Suzuki-san, Thank you for your reply. I've checked pgbench in REL1_0_STABLE. At a glance the lines from REL1_0_STABLE as follow, the part that I fixed for REL1_1_STABLE seems not to include the problem I fixed before. pgbench.c L.256-274. ---- #ifdef PGXC static char *tpc_b_bid = { "\\set nbranches :scale\n" "\\set ntellers 10 * :scale\n" "\\set naccounts 100000 * :scale\n" "\\setrandom aid 1 :naccounts\n" "\\setrandom bid 1 :nbranches\n" "\\setrandom tid 1 :ntellers\n" "\\setrandom delta -5000 5000\n" "BEGIN;\n" "UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;\n" "SELECT abalance FROM pgbench_accounts WHERE aid = :aid\n" "UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid;\n" "UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;\n" "INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);\n" "END;\n" }; #endif --- This is almost same as that of the fixed version of pgbench for REL1_1_STABLE. Best Regards, Tetsuo Sakata. (2014/03/06 16:14), Koichi Suzuki wrote: > Thank you Sakata-san; > > Yes, the patch was successful with REL1_1_STABLE. With some offset, > it was also successful with REL1_2_STABLE and master. > But failed with REL1_0_STABLE branch. > > Because of the nature of the fix, I think this should also go to 1.0.x. > > Could you further look into it? Also hope you test this fix with > REL1_0_STABLE as well. > > Best; > --- > Koichi Suzuki > > > 2014-03-06 15:28 GMT+09:00 坂田 哲夫 <sak...@la...>: >> Suzuki-san, >> >> Sorry for the delay, and thank you for your comments. >> >> I've made the patch I sent before for the XC 1.1.0 not REL_1_1_STABLE. >> So I recreated a patch for REL_1_1_STABLE. >> >> Please check the attached patch. >> >> Thanks in advance, >> >> Tetsuo Sakata. >> >> >> >> >> (2014/03/05 17:36), Koichi Suzuki wrote: >>> Sakata-san; >>> >>> I've tested the patch and found it does not apply to current >>> master/REL1_2_STABLE branch. I also tested against REL1_1_STABLE and >>> the result was the same. Could you check your patch against the >>> current repo? >>> >>> I wonder why it happens because pgbench is very stable. Maybe it >>> needs some tweak to deal with the current PG repo as well. >>> >>> Could you also consider to use the format you get with "git diff"? >>> >>> Thank you very much in advance. >>> --- >>> Koichi Suzuki >>> >>> >>> 2014-03-05 15:23 GMT+09:00 坂田 哲夫 <sak...@la...>: >>>> Hi, folks, >>>> >>>> I found a pgbench bug that pgbench fails to update tables such as >>>> pgbench_accounts and pgbench_tellers. >>>> >>>> For example, original pgbench for XC tries to update pgbench_accounts' >>>> specifying aid and bid values which are selected independently. >>>> By the pgbench's nature, bid should have a particular value for a >>>> given aid value. So the update statement fails picking up target >>>> tuple and updating the table in most cases. >>>> >>>> The attached patch, which should be applied to XC 1.1s >>>> pgbench, eliminates wrongly added bid specifications >>>> and corrects index and distribute settings related. >>>> >>>> Best regards, >>>> >>>> Tetsuo Sakata. >>>> >>>> -- >>>> sakata.tetsuo _at_ lab.ntt.co.jp >>>> SAKATA, Tetsuo. Shinagawa Tokyo JAPAN. >>>> >>>> ------------------------------------------------------------------------------ >>>> Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. >>>> With Perforce, you get hassle-free workflows. Merge that actually works. >>>> Faster operations. Version large binaries. Built-in WAN optimization and the >>>> freedom to use Git, Perforce or both. Make the move to Perforce. >>>> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk >>>> _______________________________________________ >>>> Postgres-xc-developers mailing list >>>> Pos...@li... >>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>>> >>> >>> ------------------------------------------------------------------------------ >>> Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. >>> With Perforce, you get hassle-free workflows. Merge that actually works. >>> Faster operations. Version large binaries. Built-in WAN optimization and the >>> freedom to use Git, Perforce or both. Make the move to Perforce. >>> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Postgres-xc-developers mailing list >>> Pos...@li... >>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>> >> >> >> -- >> sakata.tetsuo _at_ lab.ntt.co.jp >> SAKATA, Tetsuo. Shinagawa Tokyo JAPAN. >> >> ------------------------------------------------------------------------------ >> Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. >> With Perforce, you get hassle-free workflows. Merge that actually works. >> Faster operations. Version large binaries. Built-in WAN optimization and the >> freedom to use Git, Perforce or both. Make the move to Perforce. >> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk >> _______________________________________________ >> Postgres-xc-developers mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >> > > ------------------------------------------------------------------------------ > Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. > With Perforce, you get hassle-free workflows. Merge that actually works. > Faster operations. Version large binaries. Built-in WAN optimization and the > freedom to use Git, Perforce or both. Make the move to Perforce. > http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > -- sakata.tetsuo _at_ lab.ntt.co.jp ☆メアド変わりました oss→lab☆ SAKATA, Tetsuo. Shinagawa Tokyo JAPAN. |