forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7f44ede
committed
tableam: Don't assume that every AM uses md.c style storage.
Previously various parts of the code routed size requests throughRelationGetNumberOfBlocks[InFork]. That works if md.c is used by theAM, but not otherwise.Add a tableam callback to return the size of the table. As not everyAM will use postgres' BLCKSZ, have it return bytes, and haveRelationGetNumberOfBlocksInFork() round the byte size up into blocks.To allow code outside of the AM to determine the actual relation sizemap InvalidForkNumber the total size of a relation, as not every AMmight just need the postgres defined forks.A few users of RelationGetNumberOfBlocks() ought to be converted awayfrom that. One case, the use of it to determine whether a tid isvalid, will be fixed in a follow up commit. Others will have to waitfor v13.Author: Andres FreundDiscussion:https://postgr.es/m/20190423225201.3bbv6tbqzkb5w7cw@alap3.anarazel.de1 parent6630cca commit7f44ede
File tree
4 files changed
+110
-3
lines changed- src
- backend
- access
- heap
- table
- storage/buffer
- include/access
4 files changed
+110
-3
lines changedLines changed: 27 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1975 | 1975 |
| |
1976 | 1976 |
| |
1977 | 1977 |
| |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
1978 | 2003 |
| |
1979 | 2004 |
| |
1980 | 2005 |
| |
| |||
2556 | 2581 |
| |
2557 | 2582 |
| |
2558 | 2583 |
| |
| 2584 | + | |
| 2585 | + | |
2559 | 2586 |
| |
2560 | 2587 |
| |
2561 | 2588 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
86 | 86 |
| |
87 | 87 |
| |
88 | 88 |
| |
| 89 | + | |
| 90 | + | |
| 91 | + | |
89 | 92 |
| |
90 | 93 |
| |
91 | 94 |
| |
|
Lines changed: 40 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
| 36 | + | |
36 | 37 |
| |
37 | 38 |
| |
38 | 39 |
| |
| |||
2789 | 2790 |
| |
2790 | 2791 |
| |
2791 | 2792 |
| |
| 2793 | + | |
| 2794 | + | |
| 2795 | + | |
| 2796 | + | |
2792 | 2797 |
| |
2793 | 2798 |
| |
2794 | 2799 |
| |
2795 | 2800 |
| |
2796 |
| - | |
2797 |
| - | |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
2798 | 2835 |
| |
2799 |
| - | |
| 2836 | + | |
2800 | 2837 |
| |
2801 | 2838 |
| |
2802 | 2839 |
| |
|
Lines changed: 40 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
540 | 540 |
| |
541 | 541 |
| |
542 | 542 |
| |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
543 | 559 |
| |
544 | 560 |
| |
545 | 561 |
| |
| |||
550 | 566 |
| |
551 | 567 |
| |
552 | 568 |
| |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
553 | 573 |
| |
554 | 574 |
| |
555 | 575 |
| |
| |||
1503 | 1523 |
| |
1504 | 1524 |
| |
1505 | 1525 |
| |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
1506 | 1546 |
| |
1507 | 1547 |
| |
1508 | 1548 |
| |
|
0 commit comments
Comments
(0)