|
109 | 109 | (SELECT count(aid) AS x FROM pgbench_accounts GROUP BY abalance HAVING abalance < :border) AS q1 |
110 | 110 | WHERE pgbb.bid = q1.x; |
111 | 111 | }); |
| 112 | + |
| 113 | +# Avoid problems with an error fluctuations during the test above. |
| 114 | +$node->safe_psql('postgres',"TRUNCATE aqo_query_stat"); |
| 115 | + |
112 | 116 | # Look for top of problematic queries. |
113 | 117 | $node->command_ok(['pgbench','-t',"10",'-c',"$CLIENTS",'-j',"$THREADS", |
114 | 118 | '-f',"$analytics" ], |
|
127 | 131 | $res =$node->safe_psql('postgres', |
128 | 132 | "SELECT count(*) FROM top_time_queries(10) v |
129 | 133 | WHERE v.execution_time > 0."); |
130 | | -is($res,10); |
| 134 | +is($res,5); |
131 | 135 |
|
132 | 136 | # ############################################################################## |
133 | 137 | # |
|
281 | 285 | SELECT abalance FROM pgbench_accounts WHERE aid = :aid; |
282 | 286 | UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid; |
283 | 287 | UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid; |
284 | | -INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP); |
| 288 | +INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) |
| 289 | +VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP); |
285 | 290 | END; |
286 | 291 | \endif |
287 | 292 | }); |
|
295 | 300 | $node->restart(); |
296 | 301 |
|
297 | 302 | $node->command_ok(['pgbench','-T', |
298 | | -"5",'-c',"$CLIENTS",'-j',"$THREADS" ,'-f',"$bank"], |
| 303 | +"50",'-c',"$CLIENTS",'-j',"$THREADS" ,'-f',"$bank"], |
299 | 304 | 'Conflicts with an AQO dropping command.'); |
300 | 305 |
|
301 | 306 | $node->stop(); |