- Notifications
You must be signed in to change notification settings - Fork5
Commit928408d
committed
Fix a bug with SSI and prepared transactions:
If there's a dangerous structure T0 ---> T1 ---> T2, and T2 commits first,we need to abort something. If T2 commits before both conflicts appear,then it should be caught by OnConflict_CheckForSerializationFailure. Ifboth conflicts appear before T2 commits, it should be caught byPreCommit_CheckForSerializationFailure. But that is actually run whenT2 *prepares*. Fix that in OnConflict_CheckForSerializationFailure, bytreating a prepared T2 as if it committed already.This is mostly a problem for prepared transactions, which are in preparedstate for some time, but also for regular transactions because they also gothrough the prepared state in the SSI code for a short moment when they'recommitted.Kevin Grittner and Dan Ports1 parentb2e3be4 commit928408d
File tree
4 files changed
+40
-8
lines changed- src
- backend/storage/lmgr
- test/regress
- expected
- sql
4 files changed
+40
-8
lines changedLines changed: 35 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
244 | 244 |
| |
245 | 245 |
| |
246 | 246 |
| |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
247 | 255 |
| |
248 | 256 |
| |
249 | 257 |
| |
| |||
3165 | 3173 |
| |
3166 | 3174 |
| |
3167 | 3175 |
| |
| 3176 | + | |
| 3177 | + | |
| 3178 | + | |
| 3179 | + | |
| 3180 | + | |
| 3181 | + | |
| 3182 | + | |
3168 | 3183 |
| |
3169 | 3184 |
| |
3170 | 3185 |
| |
| |||
4363 | 4378 |
| |
4364 | 4379 |
| |
4365 | 4380 |
| |
| 4381 | + | |
| 4382 | + | |
| 4383 | + | |
| 4384 | + | |
| 4385 | + | |
4366 | 4386 |
| |
4367 | 4387 |
| |
4368 | 4388 |
| |
| |||
4381 | 4401 |
| |
4382 | 4402 |
| |
4383 | 4403 |
| |
4384 |
| - | |
| 4404 | + | |
| 4405 | + | |
| 4406 | + | |
| 4407 | + | |
| 4408 | + | |
| 4409 | + | |
4385 | 4410 |
| |
4386 | 4411 |
| |
4387 | 4412 |
| |
| |||
4400 | 4425 |
| |
4401 | 4426 |
| |
4402 | 4427 |
| |
4403 |
| - | |
| 4428 | + | |
| 4429 | + | |
4404 | 4430 |
| |
4405 | 4431 |
| |
4406 | 4432 |
| |
| |||
4411 | 4437 |
| |
4412 | 4438 |
| |
4413 | 4439 |
| |
4414 |
| - | |
| 4440 | + | |
4415 | 4441 |
| |
4416 | 4442 |
| |
4417 | 4443 |
| |
| |||
4427 | 4453 |
| |
4428 | 4454 |
| |
4429 | 4455 |
| |
| 4456 | + | |
| 4457 | + | |
| 4458 | + | |
| 4459 | + | |
| 4460 | + | |
| 4461 | + | |
4430 | 4462 |
| |
4431 | 4463 |
| |
4432 | 4464 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
131 | 131 |
| |
132 | 132 |
| |
133 | 133 |
| |
134 |
| - | |
135 | 134 |
| |
136 |
| - | |
| 135 | + | |
137 | 136 |
| |
138 |
| - | |
| 137 | + | |
139 | 138 |
| |
| 139 | + | |
140 | 140 |
| |
141 | 141 |
| |
142 | 142 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
134 | 134 |
| |
135 | 135 |
| |
136 | 136 |
| |
137 |
| - | |
138 | 137 |
| |
| 138 | + | |
139 | 139 |
| |
140 | 140 |
| |
141 | 141 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
74 | 74 |
| |
75 | 75 |
| |
76 | 76 |
| |
77 |
| - | |
78 | 77 |
| |
79 | 78 |
| |
| 79 | + | |
80 | 80 |
| |
81 | 81 |
| |
82 | 82 |
| |
|
0 commit comments
Comments
(0)