forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9a3cebe
committed
Change executor to just Assert that table locks were already obtained.
Instead of locking tables during executor startup, just Assert thatsuitable locks were obtained already during the parse/plan pipeline(or re-obtained by the plan cache). This must be so, else we have ahazard that concurrent DDL has invalidated the plan.This is pretty inefficient as well as undercommented, but it's all goingto go away shortly, so I didn't try hard. This commit is just anotherattempt to use the buildfarm to see if we've missed anything in the planto simplify the executor's table management.Note that the change needed here in relation_open() exposes thatparallel workers now really are accessing tables without holding anylock of their own, whereas they were not doing that before this commit.This does not give me a warm fuzzy feeling about that aspect of parallelquery; it does not seem like a good design, and we now know that it'shad exactly no actual testing. I think that we should modify parallelquery so that that change can be reverted.Discussion:https://postgr.es/m/468c85d9-540e-66a2-1dde-fec2b741e688@lab.ntt.co.jp1 parentc03c144 commit9a3cebe
File tree
3 files changed
+28
-15
lines changed- src/backend
- access/heap
- executor
3 files changed
+28
-15
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1140 | 1140 |
| |
1141 | 1141 |
| |
1142 | 1142 |
| |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
1143 | 1146 |
| |
1144 | 1147 |
| |
1145 | 1148 |
| |
| 1149 | + | |
1146 | 1150 |
| |
1147 | 1151 |
| |
1148 | 1152 |
| |
|
Lines changed: 17 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
849 | 849 |
| |
850 | 850 |
| |
851 | 851 |
| |
852 |
| - | |
853 |
| - | |
| 852 | + | |
| 853 | + | |
854 | 854 |
| |
855 | 855 |
| |
856 | 856 |
| |
| |||
890 | 890 |
| |
891 | 891 |
| |
892 | 892 |
| |
893 |
| - | |
894 |
| - | |
| 893 | + | |
| 894 | + | |
895 | 895 |
| |
896 | 896 |
| |
897 | 897 |
| |
| |||
903 | 903 |
| |
904 | 904 |
| |
905 | 905 |
| |
906 |
| - | |
| 906 | + | |
| 907 | + | |
907 | 908 |
| |
908 | 909 |
| |
909 | 910 |
| |
| |||
912 | 913 |
| |
913 | 914 |
| |
914 | 915 |
| |
915 |
| - | |
916 |
| - | |
917 |
| - | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
918 | 922 |
| |
919 | 923 |
| |
| 924 | + | |
920 | 925 |
| |
921 | 926 |
| |
922 | 927 |
| |
| |||
945 | 950 |
| |
946 | 951 |
| |
947 | 952 |
| |
948 |
| - | |
949 | 953 |
| |
950 | 954 |
| |
951 | 955 |
| |
| |||
963 | 967 |
| |
964 | 968 |
| |
965 | 969 |
| |
966 |
| - | |
967 |
| - | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
968 | 974 |
| |
969 | 975 |
| |
970 | 976 |
| |
|
Lines changed: 7 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
| 45 | + | |
45 | 46 |
| |
46 | 47 |
| |
47 | 48 |
| |
| |||
648 | 649 |
| |
649 | 650 |
| |
650 | 651 |
| |
651 |
| - | |
652 | 652 |
| |
653 |
| - | |
| 653 | + | |
654 | 654 |
| |
655 |
| - | |
656 |
| - | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
657 | 660 |
| |
658 | 661 |
| |
659 | 662 |
| |
|
0 commit comments
Comments
(0)