forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0adaf4c
committed
Move the handling of SELECT FOR UPDATE locking and rechecking out of
execMain.c and into a new plan node type LockRows. Like the recent changeto put table updating into a ModifyTable plan node, this increases planningflexibility by allowing the operations to occur below the top level of theplan tree. It's necessary in any case to restore the previous behavior ofhaving FOR UPDATE locking occur before ModifyTable does.This partially refactors EvalPlanQual to allow multiple rows-under-testto be inserted into the EPQ machinery before starting an EPQ test query.That isn't sufficient to fix EPQ's general bogosity in the face of plansthat return multiple rows per test row, though. Since this patch ismostly about getting some plan node infrastructure in place and not aboutfixing ten-year-old bugs, I will leave EPQ improvements for another day.Another behavioral change that we could now think about is doing FOR UPDATEbefore LIMIT, but that too seems like it should be treated as a followonpatch.1 parent05d2497 commit0adaf4c
File tree
32 files changed
+879
-317
lines changed- src
- backend
- commands
- executor
- nodes
- optimizer
- path
- plan
- prep
- util
- parser
- include
- catalog
- executor
- nodes
- optimizer
32 files changed
+879
-317
lines changedLines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
718 | 718 |
| |
719 | 719 |
| |
720 | 720 |
| |
| 721 | + | |
| 722 | + | |
| 723 | + | |
721 | 724 |
| |
722 | 725 |
| |
723 | 726 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 |
| - | |
| 7 | + | |
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
21 |
| - | |
| 20 | + | |
| 21 | + | |
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 |
| - | |
| 25 | + | |
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
|
Lines changed: 5 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
157 | 157 |
| |
158 | 158 |
| |
159 | 159 |
| |
160 |
| - | |
| 160 | + | |
| 161 | + | |
161 | 162 |
| |
162 | 163 |
| |
163 | 164 |
| |
| |||
195 | 196 |
| |
196 | 197 |
| |
197 | 198 |
| |
198 |
| - | |
199 |
| - | |
| 199 | + | |
| 200 | + |
Lines changed: 8 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
| 31 | + | |
31 | 32 |
| |
32 | 33 |
| |
33 | 34 |
| |
| |||
232 | 233 |
| |
233 | 234 |
| |
234 | 235 |
| |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
235 | 240 |
| |
236 | 241 |
| |
237 | 242 |
| |
| |||
444 | 449 |
| |
445 | 450 |
| |
446 | 451 |
| |
| 452 | + | |
447 | 453 |
| |
448 |
| - | |
| 454 | + | |
449 | 455 |
| |
450 | 456 |
| |
451 | 457 |
| |
|
Lines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| |||
155 | 155 |
| |
156 | 156 |
| |
157 | 157 |
| |
158 |
| - | |
159 |
| - | |
| 158 | + | |
160 | 159 |
| |
161 | 160 |
| |
162 | 161 |
| |
|
0 commit comments
Comments
(0)