- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit0413a55
committed
Improve compression and storage support with inheritance
A child table can specify a compression or storage method differentfrom its parents. This was previously an error. (But this wasinconsistently enforced because for example the settings could bechanged later using ALTER TABLE.) This now also allows an explicitoverride if multiple parents have different compression or storagesettings, which was previously an error that could not be overridden.The compression and storage properties remains unchanged in a childinheriting from parent(s) after its creation, i.e., when using ALTERTABLE ... INHERIT. (This is not changed.)Before this change, the error detail would mention the first pair ofconflicting parent compression or storage methods. But with thischange it waits till the child specification is considered by whichtime we may have encountered many such conflicting pairs. Hence theerror detail after this change does not include the conflictingcompression/storage methods. Those can be obtained from parentdefinitions if necessary. The code to maintain list of allconflicting methods or even the first conflicting pair does not seemworth the convenience it offers. This change is inline with what wedo with conflicting default values.Before this commit, the specified storage method could be stored inColumnDef::storage (CREATE TABLE ... LIKE) or ColumnDef::storage_name(CREATE TABLE ...). This caused the MergeChildAttribute() andMergeInheritedAttribute() to ignore a storage method specified in thechild definition since it looked only at ColumnDef::storage. Thiscommit removes ColumnDef::storage and instead usesColumnDef::storage_name to save any storage method specification. Thisis similar to how compression method specification is handled.Author: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>Discussion:https://www.postgresql.org/message-id/flat/24656cec-d6ef-4d15-8b5b-e8dfc9c833a7@eisentraut.org1 parente85732d commit0413a55
File tree
15 files changed
+408
-111
lines changed- doc/src/sgml/ref
- src
- backend
- catalog
- commands
- nodes
- parser
- include
- catalog
- nodes
- test/regress
- expected
- sql
15 files changed
+408
-111
lines changedLines changed: 7 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
398 | 398 |
| |
399 | 399 |
| |
400 | 400 |
| |
401 |
| - | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
402 | 408 |
| |
403 | 409 |
| |
404 | 410 |
| |
|
Lines changed: 23 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
974 | 974 |
| |
975 | 975 |
| |
976 | 976 |
| |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + |
Lines changed: 63 additions & 75 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
350 | 350 |
| |
351 | 351 |
| |
352 | 352 |
| |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
353 | 363 |
| |
354 | 364 |
| |
355 | 365 |
| |
| |||
360 | 370 |
| |
361 | 371 |
| |
362 | 372 |
| |
363 |
| - | |
| 373 | + | |
| 374 | + | |
364 | 375 |
| |
365 | 376 |
| |
366 | 377 |
| |
| |||
620 | 631 |
| |
621 | 632 |
| |
622 | 633 |
| |
623 |
| - | |
624 | 634 |
| |
625 | 635 |
| |
626 | 636 |
| |
| |||
1363 | 1373 |
| |
1364 | 1374 |
| |
1365 | 1375 |
| |
1366 |
| - | |
1367 |
| - | |
1368 |
| - | |
| 1376 | + | |
1369 | 1377 |
| |
1370 | 1378 |
| |
1371 | 1379 |
| |
| |||
2388 | 2396 |
| |
2389 | 2397 |
| |
2390 | 2398 |
| |
2391 |
| - | |
2392 |
| - | |
2393 |
| - | |
2394 |
| - | |
2395 |
| - | |
2396 |
| - | |
2397 |
| - | |
2398 |
| - | |
2399 |
| - | |
2400 |
| - | |
2401 |
| - | |
2402 |
| - | |
2403 |
| - | |
2404 |
| - | |
2405 |
| - | |
2406 |
| - | |
2407 |
| - | |
2408 |
| - | |
2409 |
| - | |
2410 |
| - | |
2411 |
| - | |
2412 |
| - | |
2413 | 2399 |
| |
2414 | 2400 |
| |
2415 | 2401 |
| |
| |||
2483 | 2469 |
| |
2484 | 2470 |
| |
2485 | 2471 |
| |
2486 |
| - | |
| 2472 | + | |
2487 | 2473 |
| |
2488 | 2474 |
| |
2489 | 2475 |
| |
| |||
2720 | 2706 |
| |
2721 | 2707 |
| |
2722 | 2708 |
| |
2723 |
| - | |
| 2709 | + | |
2724 | 2710 |
| |
2725 | 2711 |
| |
2726 |
| - | |
2727 |
| - | |
| 2712 | + | |
2728 | 2713 |
| |
2729 | 2714 |
| |
2730 | 2715 |
| |
| |||
2744 | 2729 |
| |
2745 | 2730 |
| |
2746 | 2731 |
| |
2747 |
| - | |
| 2732 | + | |
| 2733 | + | |
2748 | 2734 |
| |
2749 | 2735 |
| |
2750 | 2736 |
| |
| |||
2867 | 2853 |
| |
2868 | 2854 |
| |
2869 | 2855 |
| |
2870 |
| - | |
| 2856 | + | |
2871 | 2857 |
| |
2872 | 2858 |
| |
2873 | 2859 |
| |
| |||
3077 | 3063 |
| |
3078 | 3064 |
| |
3079 | 3065 |
| |
3080 |
| - | |
3081 |
| - | |
| 3066 | + | |
| 3067 | + | |
3082 | 3068 |
| |
3083 |
| - | |
| 3069 | + | |
3084 | 3070 |
| |
3085 | 3071 |
| |
3086 | 3072 |
| |
| |||
3101 | 3087 |
| |
3102 | 3088 |
| |
3103 | 3089 |
| |
| 3090 | + | |
| 3091 | + | |
| 3092 | + | |
| 3093 | + | |
| 3094 | + | |
| 3095 | + | |
| 3096 | + | |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
3104 | 3104 |
| |
3105 | 3105 |
| |
3106 | 3106 |
| |
| |||
3250 | 3250 |
| |
3251 | 3251 |
| |
3252 | 3252 |
| |
3253 |
| - | |
| 3253 | + | |
| 3254 | + | |
3254 | 3255 |
| |
3255 |
| - | |
3256 |
| - | |
3257 |
| - | |
3258 |
| - | |
3259 |
| - | |
3260 |
| - | |
3261 |
| - | |
3262 |
| - | |
3263 |
| - | |
3264 |
| - | |
| 3256 | + | |
| 3257 | + | |
3265 | 3258 |
| |
3266 | 3259 |
| |
3267 |
| - | |
| 3260 | + | |
| 3261 | + | |
3268 | 3262 |
| |
3269 |
| - | |
| 3263 | + | |
3270 | 3264 |
| |
3271 |
| - | |
3272 |
| - | |
3273 |
| - | |
3274 |
| - | |
3275 |
| - | |
3276 |
| - | |
3277 |
| - | |
3278 |
| - | |
3279 |
| - | |
3280 | 3265 |
| |
3281 | 3266 |
| |
3282 | 3267 |
| |
| |||
3343 | 3328 |
| |
3344 | 3329 |
| |
3345 | 3330 |
| |
| 3331 | + | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
3346 | 3335 |
| |
3347 | 3336 |
| |
3348 | 3337 |
| |
| |||
3356 | 3345 |
| |
3357 | 3346 |
| |
3358 | 3347 |
| |
3359 |
| - | |
| 3348 | + | |
| 3349 | + | |
3360 | 3350 |
| |
3361 | 3351 |
| |
3362 | 3352 |
| |
| |||
3403 | 3393 |
| |
3404 | 3394 |
| |
3405 | 3395 |
| |
3406 |
| - | |
3407 |
| - | |
3408 |
| - | |
3409 |
| - | |
3410 |
| - | |
3411 |
| - | |
3412 |
| - | |
3413 |
| - | |
3414 |
| - | |
3415 |
| - | |
| 3396 | + | |
| 3397 | + | |
| 3398 | + | |
| 3399 | + | |
| 3400 | + | |
| 3401 | + | |
| 3402 | + | |
| 3403 | + | |
3416 | 3404 |
| |
3417 | 3405 |
| |
3418 | 3406 |
| |
3419 | 3407 |
| |
3420 | 3408 |
| |
3421 | 3409 |
| |
3422 |
| - | |
3423 |
| - | |
3424 |
| - | |
3425 |
| - | |
3426 |
| - | |
3427 |
| - | |
| 3410 | + | |
| 3411 | + | |
| 3412 | + | |
| 3413 | + | |
| 3414 | + | |
| 3415 | + | |
3428 | 3416 |
| |
3429 | 3417 |
| |
3430 | 3418 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
500 | 500 |
| |
501 | 501 |
| |
502 | 502 |
| |
503 |
| - | |
| 503 | + | |
504 | 504 |
| |
505 | 505 |
| |
506 | 506 |
| |
|
Lines changed: 3 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3754 | 3754 |
| |
3755 | 3755 |
| |
3756 | 3756 |
| |
3757 |
| - | |
3758 | 3757 |
| |
3759 | 3758 |
| |
3760 | 3759 |
| |
| |||
3776 | 3775 |
| |
3777 | 3776 |
| |
3778 | 3777 |
| |
3779 |
| - | |
| 3778 | + | |
3780 | 3779 |
| |
3781 | 3780 |
| |
3782 | 3781 |
| |
| |||
3795 | 3794 |
| |
3796 | 3795 |
| |
3797 | 3796 |
| |
3798 |
| - | |
| 3797 | + | |
3799 | 3798 |
| |
3800 | 3799 |
| |
3801 | 3800 |
| |
| |||
13858 | 13857 |
| |
13859 | 13858 |
| |
13860 | 13859 |
| |
13861 |
| - | |
| 13860 | + | |
13862 | 13861 |
| |
13863 | 13862 |
| |
13864 | 13863 |
| |
|
Lines changed: 3 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1134 | 1134 |
| |
1135 | 1135 |
| |
1136 | 1136 |
| |
1137 |
| - | |
| 1137 | + | |
1138 | 1138 |
| |
1139 |
| - | |
| 1139 | + | |
1140 | 1140 |
| |
1141 | 1141 |
| |
1142 | 1142 |
| |
1143 | 1143 |
| |
1144 |
| - | |
1145 |
| - | |
| 1144 | + | |
1146 | 1145 |
| |
1147 | 1146 |
| |
1148 | 1147 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
404 | 404 |
| |
405 | 405 |
| |
406 | 406 |
| |
| 407 | + | |
| 408 | + | |
407 | 409 |
|
Lines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
712 | 712 |
| |
713 | 713 |
| |
714 | 714 |
| |
715 |
| - | |
| 715 | + | |
716 | 716 |
| |
717 | 717 |
| |
718 | 718 |
| |
719 | 719 |
| |
720 |
| - | |
721 |
| - | |
| 720 | + | |
722 | 721 |
| |
723 | 722 |
| |
724 | 723 |
| |
|
0 commit comments
Comments
(0)