forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3e70da2
committed
Always use the caller-provided context for radix tree leaves
Previously, it would not have worked for a caller to pass a slabcontext, since it would have been used for other things which likelyhad incompatible size. In an attempt to be helpful and avoid possiblespace wastage due to aset's power-of-two rounding, RT_CREATE wouldcreate an additional slab context if the value type was fixed-lengthand larger than pointer size. The problem was, we have since addedthe bump context type, and the generation context was a possibility aswell, so silently overriding the caller's choice may actually be worse.Commite8a6f1f arranged so that the caller-provided context isused only for leaves, so it's safe for the caller to use slab hereif they wish. As demonstration, use slab in one of the radix treeregression tests.Reviewed by Masahiko SawadaDiscussion:https://postgr.es/m/CANWCAZZDCo4k5oURg_pPxM6+WZ1oiG=sqgjmQiELuyP0Vtrwig@mail.gmail.com1 parente8a6f1f commit3e70da2
File tree
2 files changed
+4
-17
lines changed- src
- include/lib
- test/modules/test_radixtree
2 files changed
+4
-17
lines changedLines changed: 0 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1849 | 1849 |
| |
1850 | 1850 |
| |
1851 | 1851 |
| |
1852 |
| - | |
1853 | 1852 |
| |
1854 |
| - | |
1855 |
| - | |
1856 |
| - | |
1857 |
| - | |
1858 |
| - | |
1859 |
| - | |
1860 |
| - | |
1861 |
| - | |
1862 |
| - | |
1863 |
| - | |
1864 |
| - | |
1865 |
| - | |
1866 |
| - | |
1867 | 1853 |
| |
1868 | 1854 |
| |
1869 | 1855 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
313 | 313 |
| |
314 | 314 |
| |
315 | 315 |
| |
316 |
| - | |
317 |
| - | |
318 |
| - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
319 | 320 |
| |
320 | 321 |
| |
321 | 322 |
| |
|
0 commit comments
Comments
(0)