Commit 73c954d
committed
tableam: sample scan.
This moves sample scan support to below tableam. It's not optional as
there is, in contrast to e.g. bitmap heap scans, no alternative way to
perform tablesample queries. If an AM can't deal with the block based
API, it will have to throw an ERROR.
The tableam callbacks for this are block based, but given the current
TsmRoutine interface, that seems to be required.
The new interface doesn't require TsmRoutines to perform visibility
checks anymore - that requires the TsmRoutine to know details about
the AM, which we want to avoid. To continue to allow taking the
returned number of tuples account SampleScanState now has a donetuples
field (which previously e.g. existed in SystemRowsSamplerData), which
is only incremented after the visibility check succeeds.
Author: Andres Freund
Discussion: https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.de1 parent 4bb5023 commit 73c954d
File tree
10 files changed
+382
-312
lines changed- contrib
- tsm_system_rows
- tsm_system_time
- doc/src/sgml
- src
- backend
- access
- heap
- tablesample
- table
- executor
- include
- access
- nodes
10 files changed
+382
-312
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | | - | |
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
| |||
67 | 65 | | |
68 | 66 | | |
69 | 67 | | |
70 | | - | |
| 68 | + | |
71 | 69 | | |
72 | 70 | | |
73 | 71 | | |
74 | | - | |
75 | 72 | | |
76 | 73 | | |
77 | 74 | | |
| |||
187 | 184 | | |
188 | 185 | | |
189 | 186 | | |
190 | | - | |
191 | 187 | | |
192 | 188 | | |
193 | 189 | | |
| |||
206 | 202 | | |
207 | 203 | | |
208 | 204 | | |
209 | | - | |
| 205 | + | |
210 | 206 | | |
211 | 207 | | |
212 | | - | |
213 | | - | |
214 | 208 | | |
215 | 209 | | |
216 | 210 | | |
| |||
222 | 216 | | |
223 | 217 | | |
224 | 218 | | |
225 | | - | |
| 219 | + | |
226 | 220 | | |
227 | 221 | | |
228 | 222 | | |
229 | 223 | | |
230 | 224 | | |
231 | 225 | | |
232 | | - | |
| 226 | + | |
233 | 227 | | |
234 | 228 | | |
235 | 229 | | |
| |||
246 | 240 | | |
247 | 241 | | |
248 | 242 | | |
249 | | - | |
| 243 | + | |
250 | 244 | | |
251 | 245 | | |
252 | 246 | | |
| |||
259 | 253 | | |
260 | 254 | | |
261 | 255 | | |
262 | | - | |
| 256 | + | |
263 | 257 | | |
264 | 258 | | |
265 | 259 | | |
| |||
279 | 273 | | |
280 | 274 | | |
281 | 275 | | |
282 | | - | |
283 | | - | |
284 | 276 | | |
285 | 277 | | |
286 | 278 | | |
287 | | - | |
| 279 | + | |
288 | 280 | | |
289 | 281 | | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
311 | 287 | | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
319 | 291 | | |
320 | 292 | | |
321 | 293 | | |
322 | 294 | | |
323 | 295 | | |
324 | 296 | | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | 297 | | |
354 | 298 | | |
355 | 299 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
69 | | - | |
| 68 | + | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
| |||
213 | 212 | | |
214 | 213 | | |
215 | 214 | | |
216 | | - | |
| 215 | + | |
217 | 216 | | |
218 | 217 | | |
219 | | - | |
220 | | - | |
221 | 218 | | |
222 | 219 | | |
223 | 220 | | |
| |||
230 | 227 | | |
231 | 228 | | |
232 | 229 | | |
233 | | - | |
| 230 | + | |
234 | 231 | | |
235 | 232 | | |
236 | 233 | | |
237 | 234 | | |
238 | 235 | | |
239 | 236 | | |
240 | | - | |
| 237 | + | |
241 | 238 | | |
242 | 239 | | |
243 | 240 | | |
| |||
273 | 270 | | |
274 | 271 | | |
275 | 272 | | |
276 | | - | |
| 273 | + | |
277 | 274 | | |
278 | 275 | | |
279 | 276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
269 | 268 | | |
270 | 269 | | |
271 | 270 | | |
| |||
0 commit comments