forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit36784e9
committed
Improve inefficient regexes in vacuumdb TAP test.
The regexes used in 102_vacuumdb_stages.pl to check the postmaster logfor expected output contained several places with ".*.*", which isunderdetermined and can cause exponential runtime growth in Perl's regexmatcher (since it's not bright enough not to waste time seeing whetherdifferent splits of the same substring would allow a match). We werefortunate that the amount of text in the postmaster log was generally notenough to make the runtime go to the moon; although commit6271fce hadbeen on the hairy edge of an obvious problem, thanks to its increasing thedefault log verbosity to DEBUG1. Experimentation shows that anyone whotried to run this test case with an even higher log verbosity would havebeen in for serious pain. But even at default logging level, fixing thissaves several hundred ms on my workstation, more on slower buildfarmmembers.Remove the extra ".*"s, restoring more-or-less-linear matching speed.Back-patch to 9.4 where the test case was added, mostly in case anyonetries to do related debugging in a back branch.Discussion:https://postgr.es/m/32459.1525657786@sss.pgh.pa.us1 parent2f895f7 commit36784e9
1 file changed
+9
-9
lines changedLines changed: 9 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
14 |
| - | |
| 13 | + | |
| 14 | + | |
15 | 15 |
| |
16 |
| - | |
| 16 | + | |
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 |
| - | |
24 |
| - | |
| 23 | + | |
| 24 | + | |
25 | 25 |
| |
26 |
| - | |
| 26 | + | |
27 | 27 |
| |
28 |
| - | |
| 28 | + | |
29 | 29 |
| |
30 |
| - | |
| 30 | + | |
31 | 31 |
| |
32 |
| - | |
| 32 | + | |
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
|
0 commit comments
Comments
(0)