forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfdcee9f
committed
Avoid testing tuple visibility without buffer lock.
INSERT ... ON CONFLICT (specifically ExecCheckHeapTupleVisible) containsanother example of this unsafe coding practice. It is much harder to geta failure out of it than the case fixed in commit6292c23, because inmost scenarios any hint bits that could be set would have already been setearlier in the command. However, Konstantin Knizhnik reported a failurewith a custom transaction manager, and it's clearly possible to get afailure via a race condition in async-commit mode.For lack of a reproducible example, no regression test case in thiscommit.I did some testing with Asserts added to tqual.c's functions, and can saythat running "make check-world" exposed these two bugs and no others.The Asserts are messy enough that I've not added them to the code for now.Report: <57EE93C8.8080504@postgrespro.ru>Related-Discussion: <CAO3NbwOycQjt2Oqy2VW-eLTq2M5uGMyHnGm=RNga4mjqcYD7gQ@mail.gmail.com>1 parentc4016fc commitfdcee9f
1 file changed
+6
-0
lines changedLines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
194 | 194 |
| |
195 | 195 |
| |
196 | 196 |
| |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
197 | 202 |
| |
198 | 203 |
| |
199 | 204 |
| |
| |||
207 | 212 |
| |
208 | 213 |
| |
209 | 214 |
| |
| 215 | + | |
210 | 216 |
| |
211 | 217 |
| |
212 | 218 |
| |
|
0 commit comments
Comments
(0)