]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Two fixes from Tom Lan. See the posting "[PATCHES] A couple of
authorTatsuo Ishii <ishii@postgresql.org>
Sun, 4 Dec 2005 01:22:42 +0000 (01:22 +0000)
committerTatsuo Ishii <ishii@postgresql.org>
Sun, 4 Dec 2005 01:22:42 +0000 (01:22 +0000)
commit3824460544e223b3e0d529e3a6313a533a7c5726
treeafe01ecfba1de94b1132d361908858c955b7fde9
parenta9bdac055c7be8100b7d5dd881a469466717234c
Two fixes from Tom Lan. See the posting "[PATCHES] A couple of
proposed pgbench changes" on 2005/11/29 for more details.

The change at line 490 updates doCustom's local variable "commands"
after selecting a new file (command sequence).  I think that the
existing coding will cause the thing to use the first command of the
old sequence in the remainder of the routine, which would be a bug.
I have not tried to set up a test case to prove it, though.

The other two changes cause doCustom to loop after processing a
meta-command.  This might be a bit controversial, but as the code
is currently written, each meta-command "costs" one cycle of the
outer select() loop.  Thus, for example, with the default TPC-B script,
once a backend returns "COMMIT" it will not receive a new command
until four cycles of issuing commands to other backends have elapsed.
(You can see this very easily by strace'ing pgbench under load.)
contrib/pgbench/pgbench.c