forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1f282c2
committed
Refactor and improve tests of pg_walinspect
The regression tests of pg_walinspect are reworked on a few aspects:- Reorganization on the validation checks done for the start and endLSNs on the six SQL functions currently available in 1.1.- Addition of a few patterns doing bound checks for invalid start LSN,invalid end LSN, and failures in reading LSN positions, for anythingthat's been missing.- Use of a consistent style across the whole, limiting blank linesacross the queries.- Addition of a new test script for upgrades. For the time being, thisis straight-forward with a check that the upgrade from 1.0 workscorrectly. This will be made more complicated once the interface ofthis extension is reworked in 1.1 with a follow-up patch.Most of the contents of this commit are extracted from a larger patch bythe same author, largely reorganized by me to minimize the differenceswith the upcoming work aimed to lift the bound checks on the input LSNsused by the functions of this extension.Author: Bharath Rupireddy, Michael PaquierDiscussion:https://postgr.es/m/CALj2ACU0_q-o4DSweyaW9NO1KBx-QkN6G_OzYQvpjf3CZVASkg@mail.gmail.com1 parent767c598 commit1f282c2
File tree
6 files changed
+128
-34
lines changed- contrib/pg_walinspect
- expected
- sql
6 files changed
+128
-34
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
|
Lines changed: 30 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + |
Lines changed: 49 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
| 2 | + | |
| 3 | + | |
2 | 4 |
| |
3 | 5 |
| |
4 | 6 |
| |
| |||
7 | 9 |
| |
8 | 10 |
| |
9 | 11 |
| |
| 12 | + | |
10 | 13 |
| |
11 | 14 |
| |
12 | 15 |
| |
13 | 16 |
| |
14 | 17 |
| |
15 | 18 |
| |
16 | 19 |
| |
17 |
| - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
18 | 32 |
| |
19 |
| - | |
| 33 | + | |
20 | 34 |
| |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
21 | 58 |
| |
22 | 59 |
| |
23 | 60 |
| |
| |||
27 | 64 |
| |
28 | 65 |
| |
29 | 66 |
| |
30 |
| - | |
| 67 | + | |
31 | 68 |
| |
32 | 69 |
| |
33 | 70 |
| |
34 | 71 |
| |
35 | 72 |
| |
36 |
| - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
37 | 80 |
| |
38 | 81 |
| |
39 | 82 |
| |
| |||
45 | 88 |
| |
46 | 89 |
| |
47 | 90 |
| |
48 |
| - | |
| 91 | + | |
49 | 92 |
| |
50 | 93 |
| |
51 | 94 |
| |
| |||
220 | 263 |
| |
221 | 264 |
| |
222 | 265 |
| |
| 266 | + |
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
| 33 | + | |
33 | 34 |
| |
34 | 35 |
| |
35 | 36 |
| |
|
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + |
Lines changed: 33 additions & 28 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 |
| |
4 | 7 |
| |
5 | 8 |
| |
6 | 9 |
| |
7 | 10 |
| |
| 11 | + | |
8 | 12 |
| |
9 |
| - | |
10 | 13 |
| |
11 |
| - | |
12 | 14 |
| |
13 |
| - | |
14 | 15 |
| |
15 | 16 |
| |
16 | 17 |
| |
17 | 18 |
| |
18 | 19 |
| |
19 | 20 |
| |
20 |
| - | |
21 |
| - | |
22 |
| - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
23 | 46 |
| |
24 | 47 |
| |
25 | 48 |
| |
26 | 49 |
| |
27 | 50 |
| |
28 | 51 |
| |
29 |
| - | |
30 |
| - | |
31 |
| - | |
32 | 52 |
| |
33 |
| - | |
34 |
| - | |
35 |
| - | |
36 | 53 |
| |
| 54 | + | |
| 55 | + | |
| 56 | + | |
37 | 57 |
| |
38 | 58 |
| |
39 | 59 |
| |
| |||
80 | 100 |
| |
81 | 101 |
| |
82 | 102 |
| |
83 |
| - | |
84 | 103 |
| |
85 | 104 |
| |
86 |
| - | |
87 | 105 |
| |
88 | 106 |
| |
89 |
| - | |
90 | 107 |
| |
91 | 108 |
| |
92 | 109 |
| |
93 | 110 |
| |
94 | 111 |
| |
95 | 112 |
| |
96 |
| - | |
97 | 113 |
| |
98 | 114 |
| |
99 |
| - | |
100 | 115 |
| |
101 | 116 |
| |
102 |
| - | |
103 | 117 |
| |
104 | 118 |
| |
105 |
| - | |
106 | 119 |
| |
107 | 120 |
| |
108 | 121 |
| |
| |||
111 | 124 |
| |
112 | 125 |
| |
113 | 126 |
| |
114 |
| - | |
115 | 127 |
| |
116 | 128 |
| |
117 |
| - | |
118 | 129 |
| |
119 | 130 |
| |
120 |
| - | |
121 | 131 |
| |
122 | 132 |
| |
123 | 133 |
| |
124 | 134 |
| |
125 | 135 |
| |
126 |
| - | |
127 | 136 |
| |
128 | 137 |
| |
129 |
| - | |
130 | 138 |
| |
131 | 139 |
| |
132 |
| - | |
133 | 140 |
| |
134 | 141 |
| |
135 | 142 |
| |
136 | 143 |
| |
137 | 144 |
| |
138 |
| - | |
139 | 145 |
| |
140 | 146 |
| |
141 |
| - | |
142 | 147 |
| |
143 | 148 |
| |
144 |
| - | |
145 | 149 |
| |
146 | 150 |
| |
147 | 151 |
| |
| |||
154 | 158 |
| |
155 | 159 |
| |
156 | 160 |
| |
| 161 | + |
0 commit comments
Comments
(0)