Commit f6bef36
committed
Refactor tidstore.c iterator buffering.
Previously, TidStoreIterateNext() would expand the set of offsets for
each block into an internal buffer that it overwrote each time. In
order to be able to collect the offsets for multiple blocks before
working with them, change the contract. Now, the offsets are obtained
by a separate call to TidStoreGetBlockOffsets(), which can be called at
a later time. TidStoreIteratorResult objects are safe to copy and store
in a queue.
Reviewed-by: Noah Misch <noah@leadboat.com>
Discussion: https://postgr.es/m/CAAKRu_bbkmwAzSBgnezancgJeXrQZXy4G4kBTd+5=cr86H5yew@mail.gmail.com1 parent 1462aad commit f6bef36
File tree
4 files changed
+51
-42
lines changed- src
- backend/access
- common
- heap
- include/access
- test/modules/test_tidstore
4 files changed
+51
-42
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | 150 | | |
154 | 151 | | |
155 | 152 | | |
| |||
486 | 483 | | |
487 | 484 | | |
488 | 485 | | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | 486 | | |
497 | 487 | | |
498 | 488 | | |
| |||
503 | 493 | | |
504 | 494 | | |
505 | 495 | | |
506 | | - | |
507 | | - | |
508 | | - | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
509 | 499 | | |
510 | 500 | | |
511 | 501 | | |
| |||
521 | 511 | | |
522 | 512 | | |
523 | 513 | | |
524 | | - | |
525 | | - | |
| 514 | + | |
| 515 | + | |
526 | 516 | | |
527 | 517 | | |
528 | 518 | | |
| |||
540 | 530 | | |
541 | 531 | | |
542 | 532 | | |
543 | | - | |
544 | 533 | | |
545 | 534 | | |
546 | 535 | | |
| |||
575 | 564 | | |
576 | 565 | | |
577 | 566 | | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
582 | 577 | | |
583 | | - | |
| 578 | + | |
| 579 | + | |
584 | 580 | | |
585 | 581 | | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | 582 | | |
590 | 583 | | |
591 | 584 | | |
592 | 585 | | |
593 | 586 | | |
594 | 587 | | |
595 | | - | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
596 | 593 | | |
597 | 594 | | |
598 | 595 | | |
| |||
602 | 599 | | |
603 | 600 | | |
604 | 601 | | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | 602 | | |
614 | 603 | | |
615 | 604 | | |
616 | | - | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
617 | 610 | | |
618 | 611 | | |
619 | 612 | | |
620 | 613 | | |
621 | 614 | | |
| 615 | + | |
| 616 | + | |
622 | 617 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2126 | 2126 | | |
2127 | 2127 | | |
2128 | 2128 | | |
| 2129 | + | |
| 2130 | + | |
2129 | 2131 | | |
2130 | 2132 | | |
2131 | 2133 | | |
2132 | 2134 | | |
2133 | 2135 | | |
2134 | 2136 | | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
2135 | 2140 | | |
2136 | 2141 | | |
2137 | 2142 | | |
| |||
2143 | 2148 | | |
2144 | 2149 | | |
2145 | 2150 | | |
2146 | | - | |
2147 | | - | |
| 2151 | + | |
| 2152 | + | |
2148 | 2153 | | |
2149 | 2154 | | |
2150 | 2155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
271 | 276 | | |
272 | | - | |
| 277 | + | |
273 | 278 | | |
274 | 279 | | |
275 | 280 | | |
| |||
0 commit comments