forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit135b601
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 parent12ea2d6 commit135b601
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 | |
---|---|---|---|
| |||
1070 | 1070 |
| |
1071 | 1071 |
| |
1072 | 1072 |
| |
| 1073 | + | |
| 1074 | + | |
1073 | 1075 |
| |
1074 | 1076 |
| |
1075 | 1077 |
| |
| |||
1086 | 1088 |
| |
1087 | 1089 |
| |
1088 | 1090 |
| |
| 1091 | + | |
| 1092 | + | |
1089 | 1093 |
| |
1090 | 1094 |
| |
1091 | 1095 |
| |
| |||
1257 | 1261 |
| |
1258 | 1262 |
| |
1259 | 1263 |
| |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
1260 | 1289 |
| |
1261 | 1290 |
| |
1262 | 1291 |
| |
|
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)