- Notifications
You must be signed in to change notification settings - Fork5
Commit8f9622b
committed
Make DDL operations play nicely with Serializable Snapshot Isolation.
Truncating or dropping a table is treated like deletion of all tuples, andcheck for conflicts accordingly. If a table is clustered or rewritten byALTER TABLE, all predicate locks on the heap are promoted to relation-levellocks, because the tuple or page ids of any existing tuples will change andwon't be valid after rewriting the table. Arguably ALTER TABLE should betreated like a mass-UPDATE of every row, but if you e.g change the datatypeof a column, you could also argue that it's just a change to the physicallayout, not a logical change. Reindexing promotes all locks on the index torelation-level lock on the heap.Kevin Grittner, with a lot of cosmetic changes by me.1 parent16925c1 commit8f9622b
File tree
7 files changed
+499
-80
lines changed- src
- backend
- catalog
- commands
- storage/lmgr
- include/storage
7 files changed
+499
-80
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
1657 | 1658 | | |
1658 | 1659 | | |
1659 | 1660 | | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
1660 | 1669 | | |
1661 | 1670 | | |
1662 | 1671 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
1311 | 1312 | | |
1312 | 1313 | | |
1313 | 1314 | | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
1314 | 1321 | | |
1315 | 1322 | | |
1316 | 1323 | | |
| |||
2799 | 2806 | | |
2800 | 2807 | | |
2801 | 2808 | | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
2802 | 2815 | | |
2803 | 2816 | | |
2804 | 2817 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
385 | 386 | | |
386 | 387 | | |
387 | 388 | | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
388 | 397 | | |
389 | 398 | | |
390 | 399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
1039 | 1040 | | |
1040 | 1041 | | |
1041 | 1042 | | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
1042 | 1051 | | |
1043 | 1052 | | |
1044 | 1053 | | |
| |||
3529 | 3538 | | |
3530 | 3539 | | |
3531 | 3540 | | |
| 3541 | + | |
| 3542 | + | |
| 3543 | + | |
| 3544 | + | |
| 3545 | + | |
| 3546 | + | |
| 3547 | + | |
| 3548 | + | |
| 3549 | + | |
| 3550 | + | |
3532 | 3551 | | |
3533 | 3552 | | |
3534 | 3553 | | |
| |||
0 commit comments
Comments
(0)