forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite8a6f1f
committed
Get rid of radix tree's general purpose memory context
Previously, this was notionally used only for the entry point of thetree and as a convenient parent for other contexts.For shared memory, the creator previously allocated the entry pointin this context, but attaching backends didn't have access to that,so they just used the caller's context. For the sake of consistency,allocate every instance of an entry point in the caller's context.For local memory, allocate the control object in the caller's contextas well. This commit also makes the "leaf context" the notional parentof the child contexts used for nodes, so it's a bit of a misnomer,but a future commit will make the node contexts independent ratherthan children, so leave it this way for now to avoid code churn.The memory context parameter for RT_CREATE is now unused in the caseof shared memory, so remove it and adjust callers to match.In passing, remove unused "context" member from struct TidStore,which seems to have been an oversight.Reviewed by Masahiko SawadaDiscussion:https://postgr.es/m/CANWCAZZDCo4k5oURg_pPxM6+WZ1oiG=sqgjmQiELuyP0Vtrwig@mail.gmail.com1 parent960013f commite8a6f1f
File tree
3 files changed
+41
-65
lines changed- src
- backend/access/common
- include/lib
- test/modules/test_radixtree
3 files changed
+41
-65
lines changedLines changed: 9 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
113 | 113 |
| |
114 | 114 |
| |
115 | 115 |
| |
116 |
| - | |
117 |
| - | |
118 |
| - | |
119 |
| - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
120 | 120 |
| |
121 | 121 |
| |
122 | 122 |
| |
| |||
167 | 167 |
| |
168 | 168 |
| |
169 | 169 |
| |
170 |
| - | |
171 | 170 |
| |
172 | 171 |
| |
173 | 172 |
| |
| |||
201 | 200 |
| |
202 | 201 |
| |
203 | 202 |
| |
204 |
| - | |
205 |
| - | |
| 203 | + | |
206 | 204 |
| |
207 | 205 |
| |
208 | 206 |
| |
| |||
215 | 213 |
| |
216 | 214 |
| |
217 | 215 |
| |
218 |
| - | |
219 |
| - | |
220 |
| - | |
221 |
| - | |
222 |
| - | |
223 | 216 |
| |
224 | 217 |
| |
225 | 218 |
| |
| |||
235 | 228 |
| |
236 | 229 |
| |
237 | 230 |
| |
238 |
| - | |
239 |
| - | |
| 231 | + | |
240 | 232 |
| |
241 | 233 |
| |
242 | 234 |
| |
| |||
328 | 320 |
| |
329 | 321 |
| |
330 | 322 |
| |
331 |
| - | |
332 | 323 |
| |
333 | 324 |
| |
334 | 325 |
| |
| 326 | + | |
335 | 327 |
| |
336 |
| - | |
337 |
| - | |
| 328 | + | |
| 329 | + | |
338 | 330 |
| |
339 | 331 |
| |
340 | 332 |
| |
|
Lines changed: 14 additions & 21 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
275 | 275 |
| |
276 | 276 |
| |
277 | 277 |
| |
278 |
| - | |
| 278 | + | |
279 | 279 |
| |
280 | 280 |
| |
281 | 281 |
| |
| |||
706 | 706 |
| |
707 | 707 |
| |
708 | 708 |
| |
709 |
| - | |
710 |
| - | |
711 | 709 |
| |
712 | 710 |
| |
713 | 711 |
| |
| |||
1809 | 1807 |
| |
1810 | 1808 |
| |
1811 | 1809 |
| |
1812 |
| - | |
| 1810 | + | |
1813 | 1811 |
| |
1814 |
| - | |
1815 |
| - | |
1816 |
| - | |
1817 |
| - | |
| 1812 | + | |
| 1813 | + | |
1818 | 1814 |
| |
1819 | 1815 |
| |
1820 | 1816 |
| |
1821 |
| - | |
| 1817 | + | |
1822 | 1818 |
| |
1823 | 1819 |
| |
1824 | 1820 |
| |
1825 | 1821 |
| |
1826 | 1822 |
| |
1827 |
| - | |
1828 | 1823 |
| |
1829 | 1824 |
| |
1830 | 1825 |
| |
1831 | 1826 |
| |
1832 | 1827 |
| |
1833 |
| - | |
1834 |
| - | |
1835 | 1828 |
| |
1836 |
| - | |
1837 | 1829 |
| |
1838 | 1830 |
| |
1839 | 1831 |
| |
| |||
1858 | 1850 |
| |
1859 | 1851 |
| |
1860 | 1852 |
| |
1861 |
| - | |
| 1853 | + | |
1862 | 1854 |
| |
1863 | 1855 |
| |
1864 | 1856 |
| |
| |||
1880 | 1872 |
| |
1881 | 1873 |
| |
1882 | 1874 |
| |
1883 |
| - | |
1884 |
| - | |
1885 | 1875 |
| |
1886 | 1876 |
| |
1887 | 1877 |
| |
| |||
2054 | 2044 |
| |
2055 | 2045 |
| |
2056 | 2046 |
| |
2057 |
| - | |
2058 |
| - | |
| 2047 | + | |
2059 | 2048 |
| |
2060 |
| - | |
| 2049 | + | |
2061 | 2050 |
| |
2062 | 2051 |
| |
2063 |
| - | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
2064 | 2057 |
| |
2065 | 2058 |
| |
2066 | 2059 |
| |
| |||
2674 | 2667 |
| |
2675 | 2668 |
| |
2676 | 2669 |
| |
2677 |
| - | |
| 2670 | + | |
2678 | 2671 |
| |
2679 | 2672 |
| |
2680 | 2673 |
| |
|
Lines changed: 18 additions & 27 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
120 | 120 |
| |
121 | 121 |
| |
122 | 122 |
| |
123 |
| - | |
124 | 123 |
| |
125 | 124 |
| |
126 | 125 |
| |
127 | 126 |
| |
128 | 127 |
| |
129 | 128 |
| |
130 |
| - | |
131 |
| - | |
132 |
| - | |
133 |
| - | |
134 |
| - | |
135 | 129 |
| |
136 |
| - | |
137 | 130 |
| |
138 | 131 |
| |
139 |
| - | |
140 |
| - | |
| 132 | + | |
141 | 133 |
| |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
142 | 139 |
| |
143 | 140 |
| |
144 | 141 |
| |
| |||
165 | 162 |
| |
166 | 163 |
| |
167 | 164 |
| |
168 |
| - | |
169 | 165 |
| |
170 | 166 |
| |
171 | 167 |
| |
172 | 168 |
| |
173 | 169 |
| |
174 | 170 |
| |
175 | 171 |
| |
176 |
| - | |
177 | 172 |
| |
178 |
| - | |
179 |
| - | |
180 |
| - | |
181 |
| - | |
182 |
| - | |
183 | 173 |
| |
184 | 174 |
| |
185 |
| - | |
186 |
| - | |
| 175 | + | |
187 | 176 |
| |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
188 | 182 |
| |
189 | 183 |
| |
190 | 184 |
| |
| |||
300 | 294 |
| |
301 | 295 |
| |
302 | 296 |
| |
303 |
| - | |
304 | 297 |
| |
305 | 298 |
| |
306 | 299 |
| |
| |||
313 | 306 |
| |
314 | 307 |
| |
315 | 308 |
| |
316 |
| - | |
317 | 309 |
| |
318 |
| - | |
319 |
| - | |
320 |
| - | |
321 |
| - | |
322 |
| - | |
323 | 310 |
| |
324 | 311 |
| |
325 |
| - | |
326 |
| - | |
| 312 | + | |
327 | 313 |
| |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
328 | 319 |
| |
329 | 320 |
| |
330 | 321 |
| |
|
0 commit comments
Comments
(0)