- Notifications
You must be signed in to change notification settings - Fork5.2k
Commit3d7a968
committed
Obtain required table lock during cross-table updates, redux.
Commits8319e5c et al missed the fact that ATPostAlterTypeCleanupcontains three calls to ATPostAlterTypeParse, and the other twoalso need protection against passing a relid that we don't yethave lock on. Add similar logic to those code paths, and addsome test cases demonstrating the need for it.In v18 and master, the test cases demonstrate that there's abehavioral discrepancy between stored generated columns and virtualgenerated columns: we disallow changing the expression of a storedcolumn if it's used in any composite-type columns, but not that ofa virtual column. Since the expression isn't actually relevant toeither sort of composite-type usage, this prohibition seemsunnecessary; but changing it is a matter for separate discussion.For now we are just documenting the existing behavior.Reported-by: jian he <jian.universality@gmail.com>Author: jian he <jian.universality@gmail.com>Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion: CACJufxGKJtGNRRSXfwMW9SqVOPEMdP17BJ7DsBf=tNsv9pWU9g@mail.gmail.comBackpatch-through: 131 parent0cd7fca commit3d7a968
File tree
7 files changed
+85
-0
lines changed- src
- backend/commands
- test/regress
- expected
- sql
7 files changed
+85
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15488 | 15488 | | |
15489 | 15489 | | |
15490 | 15490 | | |
| 15491 | + | |
| 15492 | + | |
| 15493 | + | |
| 15494 | + | |
| 15495 | + | |
| 15496 | + | |
| 15497 | + | |
| 15498 | + | |
15491 | 15499 | | |
15492 | 15500 | | |
15493 | 15501 | | |
| |||
15504 | 15512 | | |
15505 | 15513 | | |
15506 | 15514 | | |
| 15515 | + | |
| 15516 | + | |
| 15517 | + | |
| 15518 | + | |
| 15519 | + | |
| 15520 | + | |
| 15521 | + | |
| 15522 | + | |
| 15523 | + | |
| 15524 | + | |
| 15525 | + | |
| 15526 | + | |
| 15527 | + | |
| 15528 | + | |
15507 | 15529 | | |
15508 | 15530 | | |
15509 | 15531 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4750 | 4750 | | |
4751 | 4751 | | |
4752 | 4752 | | |
| 4753 | + | |
| 4754 | + | |
| 4755 | + | |
| 4756 | + | |
| 4757 | + | |
| 4758 | + | |
| 4759 | + | |
| 4760 | + | |
4753 | 4761 | | |
4754 | 4762 | | |
4755 | 4763 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1313 | 1313 | | |
1314 | 1314 | | |
1315 | 1315 | | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
1316 | 1328 | | |
1317 | 1329 | | |
1318 | 1330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1283 | 1283 | | |
1284 | 1284 | | |
1285 | 1285 | | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
1286 | 1295 | | |
1287 | 1296 | | |
1288 | 1297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3074 | 3074 | | |
3075 | 3075 | | |
3076 | 3076 | | |
| 3077 | + | |
| 3078 | + | |
| 3079 | + | |
| 3080 | + | |
| 3081 | + | |
| 3082 | + | |
| 3083 | + | |
| 3084 | + | |
3077 | 3085 | | |
3078 | 3086 | | |
3079 | 3087 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
598 | 611 | | |
599 | 612 | | |
600 | 613 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
649 | 662 | | |
650 | 663 | | |
651 | 664 | | |
| |||
0 commit comments
Comments
(0)