forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8586bf7
committed
tableam: introduce table AM infrastructure.
This introduces the concept of table access methods, i.e. CREATE ACCESS METHOD ... TYPE TABLE and CREATE TABLE ... USING (storage-engine).No table access functionality is delegated to table AMs as of thiscommit, that'll be done in following commits.Subsequent commits will incrementally abstract table accessfunctionality to be routed through table access methods. That changeis too large to be reviewed & committed at once, so it'll be doneincrementally.Docs will be updated at the end, as adding them incrementally wouldlikely make them less coherent, and definitely is a lot more work,without a lot of benefit.Table access methods are specified similar to index access methods,i.e. pg_am.amhandler returns, as INTERNAL, a pointer to a struct withcallbacks. In contrast to index AMs that struct needs to live as longas a backend, typically that's achieved by just returning a pointer toa constant struct.Psql's \d+ now displays a table's access method. That can be disabledwith HIDE_TABLEAM=true, which is mainly useful so regression tests canbe run against different AMs. It's quite possible that this behaviourstill needs to be fine tuned.For now it's not allowed to set a table AM for a partitioned table, aswe've not resolved how partitions would inherit that. Disallowingallows us to introduce, if we decide that's the way forward, such abehaviour without a compatibility break.Catversion bumped, to add the heap table AM and references to it.Author: Haribabu Kommi, Andres Freund, Alvaro Herrera, Dimitri Golgov and othersDiscussion:https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.dehttps://postgr.es/m/20160812231527.GA690404@alvherre.pgsqlhttps://postgr.es/m/20190107235616.6lur25ph22u5u5av@alap3.anarazel.dehttps://postgr.es/m/20190304234700.w5tmhducs5wxgzls@alap3.anarazel.de1 parentf217761 commit8586bf7
File tree
50 files changed
+1055
-74
lines changed- doc/src/sgml/ref
- src
- backend
- access
- heap
- table
- bootstrap
- catalog
- commands
- nodes
- parser
- rewrite
- utils
- adt
- cache
- misc
- bin/psql
- include
- access
- catalog
- nodes
- utils
- test/regress
- expected
- sql
- tools/pgindent
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
50 files changed
+1055
-74
lines changedLines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3646 | 3646 |
| |
3647 | 3647 |
| |
3648 | 3648 |
| |
| 3649 | + | |
| 3650 | + | |
| 3651 | + | |
| 3652 | + | |
| 3653 | + | |
| 3654 | + | |
| 3655 | + | |
| 3656 | + | |
| 3657 | + | |
| 3658 | + | |
| 3659 | + | |
3649 | 3660 |
| |
3650 | 3661 |
| |
3651 | 3662 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 |
| - | |
| 15 | + | |
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
|
Lines changed: 44 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + |
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 |
| - | |
| 15 | + | |
16 | 16 |
| |
17 | 17 |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + |
Lines changed: 173 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + |
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
220 | 220 |
| |
221 | 221 |
| |
222 | 222 |
| |
| 223 | + | |
223 | 224 |
| |
224 | 225 |
| |
225 | 226 |
| |
| |||
239 | 240 |
| |
240 | 241 |
| |
241 | 242 |
| |
| 243 | + | |
242 | 244 |
| |
243 | 245 |
| |
244 | 246 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
160 | 160 |
| |
161 | 161 |
| |
162 | 162 |
| |
| 163 | + | |
| 164 | + | |
| 165 | + | |
163 | 166 |
| |
164 | 167 |
| |
165 | 168 |
| |
| |||
464 | 467 |
| |
465 | 468 |
| |
466 | 469 |
| |
| 470 | + | |
467 | 471 |
| |
468 | 472 |
| |
469 | 473 |
| |
|
Lines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
| 48 | + | |
48 | 49 |
| |
49 | 50 |
| |
50 | 51 |
| |
| |||
293 | 294 |
| |
294 | 295 |
| |
295 | 296 |
| |
| 297 | + | |
296 | 298 |
| |
297 | 299 |
| |
298 | 300 |
| |
| |||
387 | 389 |
| |
388 | 390 |
| |
389 | 391 |
| |
| 392 | + | |
390 | 393 |
| |
391 | 394 |
| |
392 | 395 |
| |
| |||
1063 | 1066 |
| |
1064 | 1067 |
| |
1065 | 1068 |
| |
| 1069 | + | |
1066 | 1070 |
| |
1067 | 1071 |
| |
1068 | 1072 |
| |
| |||
1210 | 1214 |
| |
1211 | 1215 |
| |
1212 | 1216 |
| |
| 1217 | + | |
1213 | 1218 |
| |
1214 | 1219 |
| |
1215 | 1220 |
| |
| |||
1366 | 1371 |
| |
1367 | 1372 |
| |
1368 | 1373 |
| |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
1369 | 1390 |
| |
1370 | 1391 |
| |
1371 | 1392 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
907 | 907 |
| |
908 | 908 |
| |
909 | 909 |
| |
| 910 | + | |
910 | 911 |
| |
911 | 912 |
| |
912 | 913 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
267 | 267 |
| |
268 | 268 |
| |
269 | 269 |
| |
| 270 | + | |
270 | 271 |
| |
271 | 272 |
| |
272 | 273 |
| |
|
0 commit comments
Comments
(0)