forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2576dcf
committed
Revert refactoring of hex code to src/common/
This is a combined revert of the following commits:-c3826f8, a refactoring piece that moved the hex decoding code tosrc/common/. This code was cleaned up byaef8948, as it originallyincluded no overflow checks in the same way as the base64 routines insrc/common/ used by SCRAM, making it unsafe for its purpose.-aef8948, a more advanced refactoring of the hex encoding/decoding codeto src/common/ that added sanity checks on the result buffer for hexdecoding and encoding. As reported by Hans Buschmann, those overflowchecks are expensive, and it is possible to see a performance drop inthe decoding/encoding of bytea or LOs the longer they are. Simple SQLsworking on large bytea values show a clear difference in perf profile.-ccf4e27, a cleanup made possible byaef8948.The reverts of all those commits bring back the performance of hexdecoding and encoding back to what it was in ~13. Fow now andpost-beta3, this is the simplest option.Reported-by: Hans BuschmannDiscussion:https://postgr.es/m/1629039545467.80333@nidsa.netBackpatch-through: 141 parent2313dda commit2576dcf
File tree
9 files changed
+127
-304
lines changed- src
- backend
- replication
- utils/adt
- common
- include
- common
- utils
- tools/msvc
9 files changed
+127
-304
lines changedLines changed: 12 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
16 |
| - | |
17 | 16 |
| |
18 | 17 |
| |
19 | 18 |
| |
20 | 19 |
| |
| 20 | + | |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| |||
150 | 150 |
| |
151 | 151 |
| |
152 | 152 |
| |
153 |
| - | |
154 |
| - | |
155 | 153 |
| |
156 |
| - | |
157 |
| - | |
158 |
| - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
159 | 157 |
| |
160 | 158 |
| |
161 | 159 |
| |
| |||
178 | 176 |
| |
179 | 177 |
| |
180 | 178 |
| |
181 |
| - | |
182 | 179 |
| |
183 | 180 |
| |
184 | 181 |
| |
| |||
188 | 185 |
| |
189 | 186 |
| |
190 | 187 |
| |
191 |
| - | |
192 |
| - | |
193 |
| - | |
194 |
| - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
195 | 191 |
| |
196 | 192 |
| |
197 | 193 |
| |
| |||
311 | 307 |
| |
312 | 308 |
| |
313 | 309 |
| |
314 |
| - | |
| 310 | + | |
315 | 311 |
| |
316 |
| - | |
317 | 312 |
| |
318 | 313 |
| |
319 | 314 |
| |
| |||
334 | 329 |
| |
335 | 330 |
| |
336 | 331 |
| |
337 |
| - | |
338 |
| - | |
339 |
| - | |
340 |
| - | |
341 |
| - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
342 | 336 |
| |
343 | 337 |
| |
344 | 338 |
| |
|
0 commit comments
Comments
(0)