forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf5e4e92
committed
Fix corner case where SELECT FOR UPDATE could return a row twice.
In READ COMMITTED mode, if a SELECT FOR UPDATE discovers it has to redoWHERE-clause checking on rows that have been updated since the SELECT'ssnapshot, it invokes EvalPlanQual processing to do that. If this firstoccurs within a non-first child table of an inheritance tree, the previouscoding could accidentally re-return a matching row from an earlier,already-scanned child table. (And, to add insult to injury, I think thiscould make it miss returning a row that should have been returned, if theupdated row that this happens on should still have passed the WHERE qual.)Per report from Kyotaro Horiguchi; the added isolation test is based on histest case.This has been broken for quite awhile, so back-patch to all supportedbranches.1 parentd67be55 commitf5e4e92
1 file changed
+22
-0
lines changedLines changed: 22 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
160 | 160 |
| |
161 | 161 |
| |
162 | 162 |
| |
| 163 | + | |
| 164 | + | |
163 | 165 |
| |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
164 | 186 |
| |
165 | 187 |
| |
166 | 188 |
| |
|
0 commit comments
Comments
(0)