forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita063baa
committed
Remove UpdateFreeSpaceMap(), use FreeSpaceMapVacuumRange() instead.
FreeSpaceMapVacuumRange has the same effect, is more efficient if manypages are involved, and makes fewer assumptions about how it's used.Notably, Claudio Freire pointed out that UpdateFreeSpaceMap could failif the specified freespace value isn't the maximum possible. This isn'ta problem for the single existing user, but the function represents anattractive nuisance IMO, because it's named as though it were ageneral-purpose update function and its limitations are undocumented.In any case we don't need multiple ways to get the same result.In passing, do some code review and cleanup in RelationAddExtraBlocks.In particular, I see no excuse for it to omit the PageIsNew safety checkthat's done in the mainline extension path in RelationGetBufferForTuple.Discussion:https://postgr.es/m/CAGTBQpYR0uJCNTt3M5GOzBRHo+-GccNO1nCaQ8yEJmZKSW5q1A@mail.gmail.com1 parentbc0021e commita063baa
File tree
3 files changed
+30
-99
lines changed- src
- backend
- access/heap
- storage/freespace
- include/storage
3 files changed
+30
-99
lines changedLines changed: 30 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
177 | 177 |
| |
178 | 178 |
| |
179 | 179 |
| |
180 |
| - | |
181 |
| - | |
| 180 | + | |
182 | 181 |
| |
183 |
| - | |
184 |
| - | |
185 |
| - | |
186 |
| - | |
| 182 | + | |
| 183 | + | |
187 | 184 |
| |
188 | 185 |
| |
189 | 186 |
| |
| |||
198 | 195 |
| |
199 | 196 |
| |
200 | 197 |
| |
201 |
| - | |
| 198 | + | |
202 | 199 |
| |
203 |
| - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
204 | 209 |
| |
205 | 210 |
| |
206 |
| - | |
207 | 211 |
| |
208 | 212 |
| |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
209 | 219 |
| |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
210 | 226 |
| |
| 227 | + | |
| 228 | + | |
211 | 229 |
| |
212 | 230 |
| |
| 231 | + | |
213 | 232 |
| |
214 | 233 |
| |
215 | 234 |
| |
| |||
223 | 242 |
| |
224 | 243 |
| |
225 | 244 |
| |
| 245 | + | |
226 | 246 |
| |
227 | 247 |
| |
228 | 248 |
| |
229 | 249 |
| |
230 | 250 |
| |
231 | 251 |
| |
232 |
| - | |
233 |
| - | |
234 |
| - | |
235 |
| - | |
236 | 252 |
| |
237 |
| - | |
| 253 | + | |
238 | 254 |
| |
239 | 255 |
| |
240 | 256 |
| |
|
Lines changed: 0 additions & 81 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
111 | 111 |
| |
112 | 112 |
| |
113 | 113 |
| |
114 |
| - | |
115 |
| - | |
116 | 114 |
| |
117 | 115 |
| |
118 | 116 |
| |
| |||
192 | 190 |
| |
193 | 191 |
| |
194 | 192 |
| |
195 |
| - | |
196 |
| - | |
197 |
| - | |
198 |
| - | |
199 |
| - | |
200 |
| - | |
201 |
| - | |
202 |
| - | |
203 |
| - | |
204 |
| - | |
205 |
| - | |
206 |
| - | |
207 |
| - | |
208 |
| - | |
209 |
| - | |
210 |
| - | |
211 |
| - | |
212 |
| - | |
213 |
| - | |
214 |
| - | |
215 |
| - | |
216 |
| - | |
217 |
| - | |
218 |
| - | |
219 |
| - | |
220 |
| - | |
221 |
| - | |
222 |
| - | |
223 |
| - | |
224 |
| - | |
225 |
| - | |
226 |
| - | |
227 |
| - | |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
232 |
| - | |
233 |
| - | |
234 |
| - | |
235 | 193 |
| |
236 | 194 |
| |
237 | 195 |
| |
| |||
929 | 887 |
| |
930 | 888 |
| |
931 | 889 |
| |
932 |
| - | |
933 |
| - | |
934 |
| - | |
935 |
| - | |
936 |
| - | |
937 |
| - | |
938 |
| - | |
939 |
| - | |
940 |
| - | |
941 |
| - | |
942 |
| - | |
943 |
| - | |
944 |
| - | |
945 |
| - | |
946 |
| - | |
947 |
| - | |
948 |
| - | |
949 |
| - | |
950 |
| - | |
951 |
| - | |
952 |
| - | |
953 |
| - | |
954 |
| - | |
955 |
| - | |
956 |
| - | |
957 |
| - | |
958 |
| - | |
959 |
| - | |
960 |
| - | |
961 |
| - | |
962 |
| - | |
963 |
| - | |
964 |
| - | |
965 |
| - | |
966 |
| - | |
967 |
| - | |
968 |
| - | |
969 |
| - | |
970 |
| - |
Lines changed: 0 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
37 |
| - | |
38 |
| - | |
39 |
| - | |
40 |
| - | |
41 | 37 |
| |
42 | 38 |
|
0 commit comments
Comments
(0)