forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit93401ec
committed
Fix pg_depend entry to AMs after ALTER TABLE .. SET ACCESS METHOD
ALTER TABLE .. SET ACCESS METHOD was not registering a dependency to thenew access method with the relation altered in its rewrite phase, makingpossible the drop of an access method even if there are relations thatdepend on it. During the rewrite, a temporary relation is created tobuild the new relation files before swapping the new and old files, and,while the temporary relation was registering a correct dependency to thenew AM, the old relation did not do that. A dependency on the accessmethod is added when the relation files are swapped, which is the pointwhere pg_class is updated.Materialized views and tables use the same code path, hence both wereimpacted.Backpatch down to 15, where this command has been introduced.Reported-by: Alexander LakhinReviewed-by: Nathan Bossart, Andres FreundDiscussion:https://postgr.es/m/18000-9145c25b1af475ca@postgresql.orgBackpatch-through: 151 parentcc8cca3 commit93401ec
File tree
3 files changed
+76
-0
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+76
-0
lines changedLines changed: 29 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1065 | 1065 |
| |
1066 | 1066 |
| |
1067 | 1067 |
| |
| 1068 | + | |
| 1069 | + | |
1068 | 1070 |
| |
1069 | 1071 |
| |
1070 | 1072 |
| |
| |||
1081 | 1083 |
| |
1082 | 1084 |
| |
1083 | 1085 |
| |
| 1086 | + | |
| 1087 | + | |
1084 | 1088 |
| |
1085 | 1089 |
| |
1086 | 1090 |
| |
| |||
1250 | 1254 |
| |
1251 | 1255 |
| |
1252 | 1256 |
| |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
1253 | 1282 |
| |
1254 | 1283 |
| |
1255 | 1284 |
| |
|
Lines changed: 29 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
240 | 240 |
| |
241 | 241 |
| |
242 | 242 |
| |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
243 | 272 |
| |
244 | 273 |
| |
245 | 274 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
166 | 166 |
| |
167 | 167 |
| |
168 | 168 |
| |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
169 | 187 |
| |
170 | 188 |
| |
171 | 189 |
| |
|
0 commit comments
Comments
(0)