Re: [HACKERS] Re: [COMMITTERS] pgsql: Remove pgbench "progress" test pending solution of its timing is (fwd)
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2018-01-12T23:31:28Z
Lists: pgsql-hackers
Fabien COELHO <coelho@cri.ensmp.fr> writes: > Attached is an attempt at improving the situation: I took a quick look at this and can't really convince myself that it improves our situation. The fact that it prints nothing if the runtime is outside of a tightly constrained range seems likely to hide the sort of bug you might hope such a test would detect. A simple example is that, if there's an off-by-one bug causing the test to run for 3 seconds not 2, this test script won't complain about it. Worse, if pgbench dumps core instantly on startup when given -p, this test script won't complain about it. And the test is of no value at all on very slow buildfarm critters such as valgrind or clobber-cache-always animals. > (2) the test now only expects "progress: \d" from the output, so it is enough > that one progress is shown, whenever it is shown. Hm. Could we get somewhere by making the test look for that, and adjusting the loop logic inside pgbench so that (maybe only with the tested switch values) it's guaranteed to print at least one progress output regardless of timing, because it won't check for exit until after it's printed a log message? > For the random-ness related test (--sample-rate), we could add a feature to > pgbench which allows to control the random seed, so that the number of samples > could be known in advance for testing purposes. Don't see how locking down the seed gets us anywhere. The behavior of random() can't be assumed identical across different machines, even with the same seed. regards, tom lane
Commits
-
Refactor code to print pgbench progress reports.
- 9f75e3772350 12.0 landed
-
Fix pgbench TAP test to work in VPATH builds.
- e94f2bc809a0 11.0 cited