forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3ce3fb2
committed
Ensure correct lock level is used in ALTER ... RENAME
Commit1b5d797 intended to relax the lock level used to renameindexes, but inadvertently allowed *any* relation to be renamed with alowered lock level, as long as the command is spelled ALTER INDEX.That's undesirable for other relation types, so retry the operation withthe higher lock if the relation turns out not to be an index.After this fix, ALTER INDEX <sometable> RENAME will require accessexclusive lock, which it didn't before.Author: Nathan Bossart <bossartn@amazon.com>Author: Álvaro Herrera <alvherre@alvh.no-ip.org>Reported-by: Onder Kalaci <onderk@microsoft.com>Discussion:https://postgr.es/m/PH0PR21MB1328189E2821CDEC646F8178D8AE9@PH0PR21MB1328.namprd21.prod.outlook.com1 parent533315b commit3ce3fb2
File tree
3 files changed
+127
-14
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+127
-14
lines changedLines changed: 48 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3733 | 3733 |
| |
3734 | 3734 |
| |
3735 | 3735 |
| |
3736 |
| - | |
| 3736 | + | |
3737 | 3737 |
| |
3738 | 3738 |
| |
3739 | 3739 |
| |
| |||
3743 | 3743 |
| |
3744 | 3744 |
| |
3745 | 3745 |
| |
3746 |
| - | |
| 3746 | + | |
| 3747 | + | |
3747 | 3748 |
| |
3748 |
| - | |
3749 |
| - | |
3750 |
| - | |
3751 |
| - | |
3752 |
| - | |
3753 |
| - | |
3754 |
| - | |
| 3749 | + | |
3755 | 3750 |
| |
3756 |
| - | |
3757 |
| - | |
3758 |
| - | |
3759 |
| - | |
| 3751 | + | |
| 3752 | + | |
| 3753 | + | |
| 3754 | + | |
| 3755 | + | |
| 3756 | + | |
| 3757 | + | |
| 3758 | + | |
| 3759 | + | |
| 3760 | + | |
| 3761 | + | |
| 3762 | + | |
| 3763 | + | |
| 3764 | + | |
| 3765 | + | |
| 3766 | + | |
| 3767 | + | |
| 3768 | + | |
| 3769 | + | |
| 3770 | + | |
| 3771 | + | |
| 3772 | + | |
| 3773 | + | |
| 3774 | + | |
| 3775 | + | |
| 3776 | + | |
| 3777 | + | |
| 3778 | + | |
| 3779 | + | |
| 3780 | + | |
| 3781 | + | |
| 3782 | + | |
| 3783 | + | |
3760 | 3784 |
| |
3761 | 3785 |
| |
3762 | 3786 |
| |
3763 |
| - | |
| 3787 | + | |
3764 | 3788 |
| |
3765 | 3789 |
| |
3766 | 3790 |
| |
| |||
3808 | 3832 |
| |
3809 | 3833 |
| |
3810 | 3834 |
| |
| 3835 | + | |
| 3836 | + | |
| 3837 | + | |
| 3838 | + | |
| 3839 | + | |
| 3840 | + | |
| 3841 | + | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
3811 | 3845 |
| |
3812 | 3846 |
| |
3813 | 3847 |
| |
|
Lines changed: 48 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
237 | 237 |
| |
238 | 238 |
| |
239 | 239 |
| |
| 240 | + | |
| 241 | + | |
| 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 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
240 | 288 |
| |
241 | 289 |
| |
242 | 290 |
| |
|
Lines changed: 31 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
231 | 231 |
| |
232 | 232 |
| |
233 | 233 |
| |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
234 | 265 |
| |
235 | 266 |
| |
236 | 267 |
| |
|
0 commit comments
Comments
(0)