Commit 76e91b3
committed
Add ALTER TABLESPACE ... MOVE command
This adds a 'MOVE' sub-command to ALTER TABLESPACE which allows moving sets of
objects from one tablespace to another. This can be extremely handy and avoids
a lot of error-prone scripting. ALTER TABLESPACE ... MOVE will only move
objects the user owns, will notify the user if no objects were found, and can
be used to move ALL objects or specific types of objects (TABLES, INDEXES, or
MATERIALIZED VIEWS).1 parent 6f25c62 commit 76e91b3Copy full SHA for 76e91b3
File tree
Expand file treeCollapse file tree
13 files changed
+340
-8
lines changedOpen diff view settings
Filter options
- doc/src/sgml/ref
- src
- backend
- commands
- nodes
- parser
- tcop
- include
- commands
- nodes
- parser
- test/regress
- input
- output
- tools/pgindent
Expand file treeCollapse file tree
13 files changed
+340
-8
lines changedOpen diff view settings
Collapse file
doc/src/sgml/ref/alter_tablespace.sgml
Copy file name to clipboardExpand all lines: doc/src/sgml/ref/alter_tablespace.sgml+55-4Lines changed: 55 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
12 | 12 | |
13 | 13 | |
14 | 14 | |
15 | | - |
| 15 | + |
16 | 16 | |
17 | 17 | |
18 | 18 | |
| ||
25 | 25 | |
26 | 26 | |
27 | 27 | |
| 28 | + |
28 | 29 | |
29 | 30 | |
30 | 31 | |
31 | 32 | |
32 | 33 | |
33 | 34 | |
34 | 35 | |
35 | | - |
36 | | - |
| 36 | + |
| 37 | + |
| 38 | + |
37 | 39 | |
38 | 40 | |
39 | 41 | |
40 | | - |
| 42 | + |
41 | 43 | |
42 | 44 | |
43 | 45 | |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
44 | 64 | |
45 | 65 | |
46 | 66 | |
| ||
94 | 114 | |
95 | 115 | |
96 | 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 | + |
97 | 141 | |
98 | 142 | |
99 | 143 | |
| ||
111 | 155 | |
112 | 156 | |
113 | 157 | |
| 158 | + |
| 159 | + |
| 160 | + |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | + |
114 | 165 | |
115 | 166 | |
116 | 167 | |
|
Collapse file
src/backend/commands/tablespace.c
Copy file name to clipboardExpand all lines: src/backend/commands/tablespace.c+171Lines changed: 171 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
59 | 59 | |
60 | 60 | |
61 | 61 | |
| 62 | + |
62 | 63 | |
| 64 | + |
63 | 65 | |
64 | 66 | |
65 | 67 | |
| 68 | + |
66 | 69 | |
67 | 70 | |
68 | 71 | |
69 | 72 | |
70 | 73 | |
| 74 | + |
71 | 75 | |
72 | 76 | |
73 | 77 | |
74 | 78 | |
75 | 79 | |
| 80 | + |
76 | 81 | |
77 | 82 | |
78 | 83 | |
| ||
955 | 960 | |
956 | 961 | |
957 | 962 | |
| 963 | + |
| 964 | + |
| 965 | + |
| 966 | + |
| 967 | + |
| 968 | + |
| 969 | + |
| 970 | + |
| 971 | + |
| 972 | + |
| 973 | + |
| 974 | + |
| 975 | + |
| 976 | + |
| 977 | + |
| 978 | + |
| 979 | + |
| 980 | + |
| 981 | + |
| 982 | + |
| 983 | + |
| 984 | + |
| 985 | + |
| 986 | + |
| 987 | + |
| 988 | + |
| 989 | + |
| 990 | + |
| 991 | + |
| 992 | + |
| 993 | + |
| 994 | + |
| 995 | + |
| 996 | + |
| 997 | + |
| 998 | + |
| 999 | + |
| 1000 | + |
| 1001 | + |
| 1002 | + |
| 1003 | + |
| 1004 | + |
| 1005 | + |
| 1006 | + |
| 1007 | + |
| 1008 | + |
| 1009 | + |
| 1010 | + |
| 1011 | + |
| 1012 | + |
| 1013 | + |
| 1014 | + |
| 1015 | + |
| 1016 | + |
| 1017 | + |
| 1018 | + |
| 1019 | + |
| 1020 | + |
| 1021 | + |
| 1022 | + |
| 1023 | + |
| 1024 | + |
| 1025 | + |
| 1026 | + |
| 1027 | + |
| 1028 | + |
| 1029 | + |
| 1030 | + |
| 1031 | + |
| 1032 | + |
| 1033 | + |
| 1034 | + |
| 1035 | + |
| 1036 | + |
| 1037 | + |
| 1038 | + |
| 1039 | + |
| 1040 | + |
| 1041 | + |
| 1042 | + |
| 1043 | + |
| 1044 | + |
| 1045 | + |
| 1046 | + |
| 1047 | + |
| 1048 | + |
| 1049 | + |
| 1050 | + |
| 1051 | + |
| 1052 | + |
| 1053 | + |
| 1054 | + |
| 1055 | + |
| 1056 | + |
| 1057 | + |
| 1058 | + |
| 1059 | + |
| 1060 | + |
| 1061 | + |
| 1062 | + |
| 1063 | + |
| 1064 | + |
| 1065 | + |
| 1066 | + |
| 1067 | + |
| 1068 | + |
| 1069 | + |
| 1070 | + |
| 1071 | + |
| 1072 | + |
| 1073 | + |
| 1074 | + |
| 1075 | + |
| 1076 | + |
| 1077 | + |
| 1078 | + |
| 1079 | + |
| 1080 | + |
| 1081 | + |
| 1082 | + |
| 1083 | + |
| 1084 | + |
| 1085 | + |
| 1086 | + |
| 1087 | + |
| 1088 | + |
| 1089 | + |
| 1090 | + |
| 1091 | + |
| 1092 | + |
| 1093 | + |
| 1094 | + |
| 1095 | + |
| 1096 | + |
| 1097 | + |
| 1098 | + |
| 1099 | + |
| 1100 | + |
| 1101 | + |
| 1102 | + |
| 1103 | + |
| 1104 | + |
| 1105 | + |
| 1106 | + |
| 1107 | + |
| 1108 | + |
| 1109 | + |
| 1110 | + |
| 1111 | + |
| 1112 | + |
| 1113 | + |
| 1114 | + |
| 1115 | + |
| 1116 | + |
| 1117 | + |
| 1118 | + |
| 1119 | + |
| 1120 | + |
| 1121 | + |
| 1122 | + |
| 1123 | + |
| 1124 | + |
| 1125 | + |
| 1126 | + |
| 1127 | + |
| 1128 | + |
958 | 1129 | |
959 | 1130 | |
960 | 1131 | |
|
Collapse file
src/backend/nodes/copyfuncs.c
Copy file name to clipboardExpand all lines: src/backend/nodes/copyfuncs.c+15Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3397 | 3397 | |
3398 | 3398 | |
3399 | 3399 | |
| 3400 | + |
| 3401 | + |
| 3402 | + |
| 3403 | + |
| 3404 | + |
| 3405 | + |
| 3406 | + |
| 3407 | + |
| 3408 | + |
| 3409 | + |
| 3410 | + |
| 3411 | + |
3400 | 3412 | |
3401 | 3413 | |
3402 | 3414 | |
| ||
4408 | 4420 | |
4409 | 4421 | |
4410 | 4422 | |
| 4423 | + |
| 4424 | + |
| 4425 | + |
4411 | 4426 | |
4412 | 4427 | |
4413 | 4428 | |
|
Collapse file
src/backend/nodes/equalfuncs.c
Copy file name to clipboardExpand all lines: src/backend/nodes/equalfuncs.c+14Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1634 | 1634 | |
1635 | 1635 | |
1636 | 1636 | |
| 1637 | + |
| 1638 | + |
| 1639 | + |
| 1640 | + |
| 1641 | + |
| 1642 | + |
| 1643 | + |
| 1644 | + |
| 1645 | + |
| 1646 | + |
| 1647 | + |
1637 | 1648 | |
1638 | 1649 | |
1639 | 1650 | |
| ||
2877 | 2888 | |
2878 | 2889 | |
2879 | 2890 | |
| 2891 | + |
| 2892 | + |
| 2893 | + |
2880 | 2894 | |
2881 | 2895 | |
2882 | 2896 | |
|
0 commit comments