forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8d1c1ca
committed
Reduce cost of test_decoding's new oldest_xmin test
Change a whole-database VACUUM into doing just pg_attribute, which isthe portion that verifies what we want it to do. The originalformulation wastes a lot of CPU time, which leads the test to fail whenruntime exceeds isolationtester timeout when it's super-slow, such asunder CLOBBER_CACHE_ALWAYS. Per buildfarm member friarbird.It turns out that the previous shape of the test doesn't always detectthe condition it is supposed to detect (on unpatched reorderbuffercode): the reason is that there is a good chance of encountering axl_running_xacts record (logged every 15 seconds) before the checkpoint-- and because we advance the xmin when we receive that WAL record, andwe *don't* advance the xmin twice consecutively without receiving aclient message in between, that means the xmin is not advanced enoughfor the tuple to be pruned from pg_attribute by VACUUM. So the testwould spuriously pass.The reason this test deficiency wasn't detected earlier is that HOTpruning removes the tuple anyway, even if vacuum leaves it in place, sothe test correctly fails (detecting the coding mistake), but for thewrong reason.To fix this mess, run the s0_get_changes step twice before vacuuminstead of once: this seems to cause the xmin to be advanced reliably,wreaking havoc with more certainty.Author: Arseny SherDiscussion:https://postgr.es/m/87h8lkuxoa.fsf@ars-thinkpad1 parentf61988d commit8d1c1ca
File tree
2 files changed
+11
-5
lines changed- contrib/test_decoding
- expected
- specs
2 files changed
+11
-5
lines changedLines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 |
| - | |
| 3 | + | |
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 |
| |
18 |
| - | |
| 21 | + | |
19 | 22 |
| |
20 | 23 |
| |
21 | 24 |
| |
|
Lines changed: 6 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 |
| - | |
| 25 | + | |
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
33 |
| - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 |
| |
35 | 38 |
| |
36 | 39 |
| |
37 |
| - | |
| 40 | + |
0 commit comments
Comments
(0)