forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf3faf35
committed
Don't create pg_type entries for sequences or toast tables.
Commitf7f70d5 left one inconsistency behind: we're still creatingpg_type entries for the composite types of sequences and toast tables,but not arrays over those composites. But there seems precious littlereason to have named composite types for toast tables, and not much moreto have them for sequences (especially given the thought that sequencesmay someday not be standalone relations at all).So, let's close that inconsistency by removing these composite types,rather than adding arrays for them. This buys back a little bit ofthe initial pg_type bloat added by the previous patch, and could bea significant savings in a large database with many toast tables.Aside from a small logic rearrangement in heap_create_with_catalog,this patch mostly needs to clean up some places that were assuming thatpg_class.reltype always has a valid value. Those are really pre-existingbugs, given that it's documented otherwise; notably, the plpgsql changesfix code that gives "cache lookup failed for type 0" on indexes today.But none of these seem interesting enough to back-patch.Also, remove the pg_dump/pg_upgrade infrastructure for propagatinga toast table's pg_type OID into the new database, since we no longerneed that.Discussion:https://postgr.es/m/761F1389-C6A8-4C15-80CE-950C961F5341@gmail.com1 parenta8aaa0c commitf3faf35
File tree
12 files changed
+102
-123
lines changed- doc/src/sgml
- src
- backend
- catalog
- commands
- nodes
- utils
- adt
- cache
- bin/pg_dump
- include/catalog
- pl/plpgsql/src
12 files changed
+102
-123
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1895 | 1895 |
| |
1896 | 1896 |
| |
1897 | 1897 |
| |
1898 |
| - | |
| 1898 | + | |
| 1899 | + | |
1899 | 1900 |
| |
1900 | 1901 |
| |
1901 | 1902 |
| |
|
Lines changed: 43 additions & 32 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1000 | 1000 |
| |
1001 | 1001 |
| |
1002 | 1002 |
| |
1003 |
| - | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
1004 | 1006 |
| |
1005 | 1007 |
| |
1006 | 1008 |
| |
| |||
1085 | 1087 |
| |
1086 | 1088 |
| |
1087 | 1089 |
| |
| 1090 | + | |
1088 | 1091 |
| |
1089 | 1092 |
| |
1090 | 1093 |
| |
| |||
1118 | 1121 |
| |
1119 | 1122 |
| |
1120 | 1123 |
| |
1121 |
| - | |
1122 |
| - | |
1123 | 1124 |
| |
1124 | 1125 |
| |
1125 | 1126 |
| |
| |||
1262 | 1263 |
| |
1263 | 1264 |
| |
1264 | 1265 |
| |
1265 |
| - | |
1266 |
| - | |
| 1266 | + | |
| 1267 | + | |
1267 | 1268 |
| |
1268 | 1269 |
| |
1269 | 1270 |
| |
1270 | 1271 |
| |
1271 | 1272 |
| |
1272 | 1273 |
| |
1273 |
| - | |
1274 |
| - | |
1275 |
| - | |
1276 |
| - | |
1277 |
| - | |
1278 |
| - | |
1279 |
| - | |
1280 |
| - | |
1281 |
| - | |
1282 |
| - | |
1283 |
| - | |
1284 |
| - | |
1285 |
| - | |
1286 |
| - | |
1287 |
| - | |
1288 |
| - | |
1289 |
| - | |
1290 |
| - | |
1291 |
| - | |
1292 |
| - | |
1293 |
| - | |
1294 |
| - | |
1295 |
| - | |
1296 |
| - | |
1297 |
| - | |
1298 |
| - | |
1299 |
| - | |
1300 | 1274 |
| |
| 1275 | + | |
| 1276 | + | |
1301 | 1277 |
| |
1302 | 1278 |
| |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
1303 | 1306 |
| |
1304 | 1307 |
| |
1305 | 1308 |
| |
| |||
1336 | 1339 |
| |
1337 | 1340 |
| |
1338 | 1341 |
| |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
1339 | 1350 |
| |
1340 | 1351 |
| |
1341 | 1352 |
| |
|
Lines changed: 2 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
37 |
| - | |
38 |
| - | |
39 |
| - | |
40 | 37 |
| |
41 | 38 |
| |
42 | 39 |
| |
| |||
135 | 132 |
| |
136 | 133 |
| |
137 | 134 |
| |
138 |
| - | |
139 | 135 |
| |
140 | 136 |
| |
141 | 137 |
| |
| |||
181 | 177 |
| |
182 | 178 |
| |
183 | 179 |
| |
184 |
| - | |
185 |
| - | |
| 180 | + | |
186 | 181 |
| |
187 | 182 |
| |
188 | 183 |
| |
| |||
234 | 229 |
| |
235 | 230 |
| |
236 | 231 |
| |
237 |
| - | |
238 |
| - | |
239 |
| - | |
240 |
| - | |
241 |
| - | |
242 |
| - | |
243 |
| - | |
244 |
| - | |
245 |
| - | |
246 |
| - | |
247 |
| - | |
248 | 232 |
| |
249 | 233 |
| |
250 | 234 |
| |
| |||
255 | 239 |
| |
256 | 240 |
| |
257 | 241 |
| |
258 |
| - | |
| 242 | + | |
259 | 243 |
| |
260 | 244 |
| |
261 | 245 |
| |
|
Lines changed: 11 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11001 | 11001 |
| |
11002 | 11002 |
| |
11003 | 11003 |
| |
11004 |
| - | |
11005 |
| - | |
| 11004 | + | |
| 11005 | + | |
11006 | 11006 |
| |
11007 | 11007 |
| |
11008 | 11008 |
| |
| |||
12564 | 12564 |
| |
12565 | 12565 |
| |
12566 | 12566 |
| |
12567 |
| - | |
12568 |
| - | |
| 12567 | + | |
12569 | 12568 |
| |
12570 | 12569 |
| |
12571 | 12570 |
| |
| |||
15009 | 15008 |
| |
15010 | 15009 |
| |
15011 | 15010 |
| |
15012 |
| - | |
15013 |
| - | |
15014 |
| - | |
| 15011 | + | |
| 15012 | + | |
| 15013 | + | |
| 15014 | + | |
15015 | 15015 |
| |
15016 | 15016 |
| |
15017 | 15017 |
| |
| |||
15206 | 15206 |
| |
15207 | 15207 |
| |
15208 | 15208 |
| |
15209 |
| - | |
15210 |
| - | |
| 15209 | + | |
| 15210 | + | |
| 15211 | + | |
15211 | 15212 |
| |
15212 |
| - | |
15213 |
| - | |
| 15213 | + | |
15214 | 15214 |
| |
15215 | 15215 |
| |
15216 | 15216 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
145 | 145 |
| |
146 | 146 |
| |
147 | 147 |
| |
148 |
| - | |
149 |
| - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
150 | 152 |
| |
151 | 153 |
| |
152 | 154 |
| |
|
Lines changed: 0 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
54 |
| - | |
55 |
| - | |
56 |
| - | |
57 |
| - | |
58 |
| - | |
59 |
| - | |
60 |
| - | |
61 |
| - | |
62 |
| - | |
63 |
| - | |
64 |
| - | |
65 | 54 |
| |
66 | 55 |
| |
67 | 56 |
| |
|
Lines changed: 7 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
506 | 506 |
| |
507 | 507 |
| |
508 | 508 |
| |
509 |
| - | |
510 |
| - | |
511 |
| - | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
512 | 513 |
| |
513 | 514 |
| |
514 | 515 |
| |
| |||
1886 | 1887 |
| |
1887 | 1888 |
| |
1888 | 1889 |
| |
1889 |
| - | |
| 1890 | + | |
1890 | 1891 |
| |
1891 | 1892 |
| |
1892 | 1893 |
| |
| |||
5692 | 5693 |
| |
5693 | 5694 |
| |
5694 | 5695 |
| |
5695 |
| - | |
5696 |
| - | |
| 5696 | + | |
| 5697 | + | |
5697 | 5698 |
| |
5698 | 5699 |
| |
5699 | 5700 |
| |
|
Lines changed: 12 additions & 34 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
272 | 272 |
| |
273 | 273 |
| |
274 | 274 |
| |
275 |
| - | |
| 275 | + | |
276 | 276 |
| |
277 | 277 |
| |
278 | 278 |
| |
| |||
4493 | 4493 |
| |
4494 | 4494 |
| |
4495 | 4495 |
| |
4496 |
| - | |
| 4496 | + | |
4497 | 4497 |
| |
4498 | 4498 |
| |
4499 | 4499 |
| |
4500 | 4500 |
| |
4501 | 4501 |
| |
4502 | 4502 |
| |
4503 | 4503 |
| |
4504 |
| - | |
4505 | 4504 |
| |
4506 |
| - | |
4507 |
| - | |
4508 |
| - | |
4509 |
| - | |
4510 |
| - | |
4511 |
| - | |
4512 |
| - | |
4513 | 4505 |
| |
4514 |
| - | |
| 4506 | + | |
4515 | 4507 |
| |
4516 |
| - | |
4517 |
| - | |
4518 | 4508 |
| |
4519 |
| - | |
| 4509 | + | |
4520 | 4510 |
| |
4521 | 4511 |
| |
4522 | 4512 |
| |
4523 | 4513 |
| |
4524 | 4514 |
| |
4525 |
| - | |
4526 |
| - | |
4527 |
| - | |
4528 |
| - | |
4529 |
| - | |
4530 |
| - | |
4531 |
| - | |
4532 |
| - | |
4533 |
| - | |
4534 |
| - | |
4535 |
| - | |
4536 |
| - | |
4537 |
| - | |
4538 |
| - | |
4539 |
| - | |
4540 |
| - | |
| 4515 | + | |
| 4516 | + | |
| 4517 | + | |
4541 | 4518 |
| |
4542 | 4519 |
| |
4543 | 4520 |
| |
4544 |
| - | |
4545 |
| - | |
4546 | 4521 |
| |
4547 | 4522 |
| |
4548 | 4523 |
| |
| |||
17209 | 17184 |
| |
17210 | 17185 |
| |
17211 | 17186 |
| |
17212 |
| - | |
17213 |
| - | |
| 17187 | + | |
| 17188 | + | |
| 17189 | + | |
| 17190 | + | |
| 17191 | + | |
17214 | 17192 |
| |
17215 | 17193 |
| |
17216 | 17194 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
20 | 19 |
| |
21 | 20 |
| |
22 | 21 |
| |
|
0 commit comments
Comments
(0)